Expensive
',shapeColor:null},parentId:"page:page",index:"a4",typeName:"shape"},{x:1282.02734375,y:547.42578125,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:lLHXbsMOmu2pfYDmh7SMV",type:"text",props:{color:"black",size:"m",w:104,text:"",font:"draw",align:"middle",autoSize:!0,scale:1,h:20,growY:24,html:'Take time
',shapeColor:null},parentId:"page:page",index:"a5",typeName:"shape"},{x:1185.5507812500002,y:689.046875,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:FJv1W-bQpfCY0dAUn_ezA",type:"text",props:{color:"black",size:"m",w:96,text:"",font:"draw",align:"middle",autoSize:!0,scale:1,h:20,growY:52,html:'Low
quality
Meeting with Jon
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aD",typeName:"shape"},{x:204.97813786171344,y:605.0019073645135,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:IgEYD45iYr1sSFMoAwbyu",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Team bonding",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Team bonding
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDG",typeName:"shape"},{x:204.97813786171344,y:297.31890598073045,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:Qim4eNR90mSPnWlJh468S",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Checking emails",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Checking emails
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDV",typeName:"shape"},{x:1154.2427431046506,y:295.64859941977187,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:IL-fsOSVuSRXre2dwItqj",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"HR meetings",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'HR meetings
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDZ",typeName:"shape"},{x:1154.2427431046506,y:379.7812472022469,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:bH7UwVBlNxoEzsh_1zjen",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Onboarding new hire",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Onboarding new hire
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDb",typeName:"shape"},{x:521.3996729426926,y:211.51595163729675,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:HAHtaenTwvKec_w0q3MVQ",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Attend CS meeting",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Attend CS meeting
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDd",typeName:"shape"},{x:1471.3838520277761,y:379.7812472022469,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:7ONsfQ5KbFBdZuwBMYOXz",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"Team happy hour",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Team happy hour
',shapeColor:"#26A688",strokeWidth:"sm"},parentId:"page:page",index:"aDe",typeName:"shape"},{x:1471.3838520277761,y:211.51595163729675,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:ov9MLbM2hIPHiHbKtLXgq",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Attend CS meeting",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Attend CS meeting
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDf",typeName:"shape"},{x:1471.3838520277761,y:295.64859941977187,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:JcWFs24GgyS_MNCWFyy4F",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Office tour",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Office tour
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDg",typeName:"shape"},{x:837.8212080236717,y:211.51595163729675,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:avNg2b0XCoj-PSVRH9NqC",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"1:1 with Zach",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'1:1 with Zach
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDh",typeName:"shape"},{x:837.8212080236717,y:297.45150900814224,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:B3hQTKLjKcuwSsT8VwJpR",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Company all hands",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Company all hands
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDj",typeName:"shape"},{x:837.8212080236717,y:379.7812472022469,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:Ew3E_uQg_oIqeazf2vqpP",type:"geo",props:{w:251,h:101.34061312191727,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Bugbashing diagrams V2 with eng team",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Bugbashing diagrams V2 with eng team
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDk",typeName:"shape"},{x:837.8212080236717,y:500.13645302107966,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:Fg4fxWRIxgyovffXhHIzF",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Customer call",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Customer call
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDkV",typeName:"shape"},{x:1154.2427431046506,y:211.51595163729678,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:VvbN_RGjDdrkdA1f5rsRd",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Vendor call",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Vendor call
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDkl",typeName:"shape"},{x:204.97813786171344,y:381.1218603241642,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:2vK8h6FMVleRUW2G9Od19",type:"geo",props:{w:251,h:121.0625,geo:"rectangle",color:"black",labelColor:"black",fill:"semi",dash:"solid",size:"m",font:"draw",text:"Setup a call with our food vendor at the office in SF",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Setup a call with our food vendor at the office in SF
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aDl",typeName:"shape"},{x:204.97813786171344,y:521.1989530210797,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:9SYkhq44JuzFO637hB390",type:"geo",props:{w:250.16487115239204,h:64.78836164651827,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:" Lunch",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'\uD83C\uDF54 Lunch
',shapeColor:"#26A688",strokeWidth:"none"},parentId:"page:page",index:"aDt",typeName:"shape"},{x:515.9398891287151,y:134.56584632459914,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:SDZcV2JidoSxClP0MxiaV",type:"text",props:{color:"black",size:"m",w:261.08443878034683,text:"Tue",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:34,html:'Campaign brief
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a6",typeName:"shape"},{x:424.8515625,y:350.465234375,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:L4SJqvXoG-EotQtRMTPY8",type:"geo",props:{w:242.98046875,h:68.80859375,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"Brainstorming idea",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Brainstorming idea
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a7",typeName:"shape"},{x:642.359375,y:438.32890625000005,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:5PsZHZLZu4_CVVyhnfMhV",type:"geo",props:{w:317.4921875,h:68.80859375,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"Pitching V1 draft",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Pitching V1 draft
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a8",typeName:"shape"},{x:801.10546875,y:526.192578125,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:gaTWbH01oHY5U8i7-0YWM",type:"geo",props:{w:216.140625,h:68.80859375,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"Team sync",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Team sync
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a9",typeName:"shape"},{x:1017.24609375,y:614.05625,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:LTp09wJ7CZ4hmqxK3TqOs",type:"geo",props:{w:216.140625,h:68.80859375,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"Product launch",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'Product launch
',shapeColor:"#26A688",strokeWidth:"none"},parentId:"page:page",index:"aA",typeName:"shape"},{x:1224.703125,y:701.919921875,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:YRlBT-re2qFu7J2lowdkX",type:"geo",props:{w:216.140625,h:68.80859375,geo:"rectangle",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"PR push",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'PR push
',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"aB",typeName:"shape"}],assets:[],meta:{},width:null,svg:''}},concentricCircles:{type:"diagram",attrs:{horizontalAlign:"center",shapes:[{x:565.8710406141417,y:267.2348052328804,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:TAw6_9rfNRYvwwWYH_HCE",type:"geo",props:{w:477.70836857906545,h:477.70836857906545,geo:"ellipse",color:"black",labelColor:"black",fill:"none",dash:"solid",size:"m",font:"draw",text:"",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a1",typeName:"shape"},{x:616.0939715727751,y:367.685804457496,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:EgzihrX9ISnR1IDnH3Nb-",type:"geo",props:{w:377.2573693544499,h:377.2573693544499,geo:"ellipse",color:"black",labelColor:"black",fill:"none",dash:"solid",size:"m",font:"draw",text:"",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a2",typeName:"shape"},{x:668.9469658115557,y:473.48237590821486,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:PjG3dFUaDsYRxpsyfV9pW",type:"geo",props:{w:271.5513808768887,h:271.5513808768887,geo:"ellipse",color:"black",labelColor:"black",fill:"none",dash:"solid",size:"m",font:"draw",text:"",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a3",typeName:"shape"},{x:710.2141277616566,y:556.2474435629489,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:q-kyMkxhO2b6WeTH0ets_",type:"geo",props:{w:189.21399728645815,h:189.21399728645815,geo:"ellipse",color:"black",labelColor:"black",fill:"solid",dash:"solid",size:"m",font:"draw",text:"",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'',shapeColor:"#26A688",strokeWidth:"sm"},parentId:"page:page",index:"a4",typeName:"shape"},{x:464.90514248458214,y:65.35157205630884,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:j5viwZdfHENtGXtzpl0By",type:"geo",props:{w:679.628218169672,h:679.628218169672,geo:"ellipse",color:"black",labelColor:"black",fill:"none",dash:"solid",size:"m",font:"draw",text:"",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a0",typeName:"shape"},{x:510.91801733541865,y:157.35060141748204,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:ktAwuZYMrly1jH7bcYmPU",type:"geo",props:{w:587.634481733614,h:587.634481733614,geo:"ellipse",color:"black",labelColor:"black",fill:"none",dash:"solid",size:"m",font:"draw",text:"",align:"middle",verticalAlign:"middle",growY:0,url:"",html:'',shapeColor:null,strokeWidth:"sm"},parentId:"page:page",index:"a0V",typeName:"shape"},{x:725.4037617637376,y:93.6328125,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:arpSUqzdolhE3v92x2Hlg",type:"text",props:{color:"black",size:"m",w:159,text:"",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:28,html:'Strangers
',shapeColor:null},parentId:"page:page",index:"a6",typeName:"shape"},{x:698.7226562500001,y:191.5703125,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:p4dDCuUjLEG9hLXieB7uX",type:"text",props:{color:"black",size:"m",w:211.83203125000003,text:"",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:28,html:'Community
',shapeColor:null},parentId:"page:page",index:"a7",typeName:"shape"},{x:698.7226562500001,y:300.83203125,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:IQ2anr8KXqvDn1DTJJIM1",type:"text",props:{color:"black",size:"m",w:212,text:"",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:28,html:'Acquaintances
',shapeColor:null},parentId:"page:page",index:"a8",typeName:"shape"},{x:698.7226562500001,y:410.09375,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:O77tcKAFokcE_JogX_h3n",type:"text",props:{color:"black",size:"m",w:212,text:"",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:28,html:'Friends
',shapeColor:null},parentId:"page:page",index:"a9",typeName:"shape"},{x:698.7226562500001,y:497.0234375,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:Ku24cDrP5-0A12pFZdch1",type:"text",props:{color:"black",size:"m",w:212,text:"",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:28,html:'Family
',shapeColor:null},parentId:"page:page",index:"aA",typeName:"shape"},{x:698.7226562500001,y:628.6171875,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:Bd8YnNb0vDeKdtlRMcNh_",type:"text",props:{color:"black",size:"m",w:212,text:"",font:"draw",align:"middle",autoSize:!1,scale:1,h:20,growY:27,html:'Friends
',shapeColor:null},parentId:"page:page",index:"aE",typeName:"shape"},{x:1373.8179823238074,y:633.1902718076452,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:9DzQSxc3Xru2fKGSdFx16",type:"text",props:{color:"black",size:"m",w:191,text:"Family",font:"draw",align:"start",autoSize:!1,scale:1,h:44,growY:0,html:'Family
',shapeColor:null},parentId:"page:page",index:"aF",typeName:"shape"},{x:1496.9281991809464,y:383.1656811411449,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:VKIjJjszvAlrkJQJfGUV1",type:"text",props:{color:"black",size:"m",w:204.36525326738322,text:"Acquaintances",font:"draw",align:"start",autoSize:!1,scale:1,h:44,growY:0,html:'Acquaintances
',shapeColor:null},parentId:"page:page",index:"aG",typeName:"shape"},{x:1451.2460195004435,y:263.4599680925235,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:V6a9zGihrEPKbWp0WyYFu",type:"text",props:{color:"black",size:"m",w:204.36525326738322,text:"Community",font:"draw",align:"start",autoSize:!1,scale:1,h:44,growY:0,html:'Community
',shapeColor:null},parentId:"page:page",index:"aH",typeName:"shape"},{x:1389.4198642208344,y:155.14109047464459,rotation:0,isLocked:!1,opacity:1,meta:{},id:"shape:tneIatSl5yj2J6kQLD4Hy",type:"text",props:{color:"black",size:"m",w:204.36525326738322,text:"Strangers",font:"draw",align:"start",autoSize:!1,scale:1,h:44,growY:0,html:'Strangers
',shapeColor:null},parentId:"page:page",index:"aI",typeName:"shape"}],assets:[{meta:{},id:"asset:1250396056",type:"image",typeName:"asset",props:{name:"tldrawFile",src:"https://cdn-staging.gamma.app/QWjS6fBfpt/1503bafa04414cc2a7b9848c75a23885/original/tldrawFile.png",w:800,h:801,mimeType:"image/png",isAnimated:!1}}],meta:{},width:534.2222222222222,svg:''}}},d={src:"https://assets.gammahosted.com/nk2sf9ktd/_next/static/media/Gantt.63fb5eea.svg",height:96,width:253,blurWidth:0,blurHeight:0},p={src:"https://assets.gammahosted.com/nk2sf9ktd/_next/static/media/Kanban.fa47adcf.svg",height:96,width:253,blurWidth:0,blurHeight:0},u=()=>[{key:"diagram",name:()=>a.Ru._({id:"G1q1hG"}),keywords:["sketch","drawing","shapes","diagram","canvas","freeform"],shortcut:"/diagram"},{key:"calendarWeek",name:()=>a.Ru._({id:"ToE1YL"}),keywords:["week","days","calendar","diagram","kanban","schedule","timeline"],icon:n.aXh,previewImage:p},{key:"calendarMonths",name:()=>a.Ru._({id:"jIipv0"}),keywords:["month","days","calendar","diagram","kanban","schedule","gantt chart","timeline"],icon:n.nKW,previewImage:d}].map(e=>{let t="diagram"===e.key?{type:"diagram",attrs:{}}:c[e.key];return{nodeName:"diagram",icon:n.qTS,...e,execute:e=>{let i=(0,o.rZ)(),n=s()(t);n.attrs.id=i,(0,o.CD)(i,!0),e.commands.insertContent(n)},dragStartFn:e=>{let i=(0,o.rZ)(),n=s()(t);n.attrs.id=i,(0,o.CD)(i,!0),(0,l.fS)({editor:e,content:n})}}}).filter(e=>!!e)},11076:(e,t,i)=>{"use strict";i.d(t,{a:()=>x});var n=i(6029),a=i(78140),r=i(36999),s=i(49611),l=i(41283),o=i(99492),c=i(48621),d=i(31241),p=i(3616),u=i(77650),h=i(3702),g=i(81949),m=i(91496);let x=e=>{let{editor:t,color:i,setColor:x,analyticsSource:f}=e;return(0,n.jsxs)(a.W,{isLazy:!0,onClose:()=>t&&(0,m.q)(t),children:[(0,n.jsx)(d.Tz,{placement:"top",label:(0,n.jsx)(p.x6,{id:"XAIjEI"}),"aria-label":u.Ru._({id:"XAIjEI"}),children:(0,n.jsx)(r.I,{as:s.$,variant:"toolbar","data-formatting-menu-button":!0,rightIcon:(0,n.jsx)(c.g,{icon:o.Jt$,transform:"shrink-6"}),size:"sm",onMouseDown:g.Fw,children:(0,n.jsx)(c.g,{icon:o.fyG})})}),(0,n.jsx)(l.c,{overflow:"hidden",children:(0,n.jsx)(h.b,{currentColor:i||null,setColor:x,source:f})})]})}},11158:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});let n=e=>!!e&&!!e.src},11462:(e,t,i)=>{"use strict";i.d(t,{n:()=>o});var n=i(37243),a=i(42725),r=i.n(a),s=i(64022),l=i.n(s);let o=n.YY.create({name:"updateAttributesAtPos",addCommands:()=>({updateAttributesAtPos:(e,t)=>i=>{let{tr:n}=i;return Object.entries(t).forEach(t=>{let[i,a]=t;n.setNodeAttribute(e,i,a)}),!0},updateNestedAttributesAtPos:(e,t)=>i=>{let{tr:n}=i,a=n.doc.nodeAt(e);return!!a&&(Object.entries(t).forEach(t=>{let[i,r]=t,s=l()(r)?{...a.attrs[i],...r}:r;n.setNodeAttribute(e,i,s)}),!0)},updateAttributeKeyPathAtPos:(e,t,i)=>n=>{var a;let{tr:s,state:l}=n,o=null==(a=l.doc.nodeAt(e))?void 0:a.attrs;if(!o)return!1;let c=JSON.parse(JSON.stringify(o));return Object.entries(r()(c,t,i)).forEach(t=>{let[i,n]=t;s.setNodeAttribute(e,i,n)}),!0}})})},11719:(e,t,i)=>{"use strict";i.d(t,{O:()=>n});let n={prompt:"",template:null,settings:{},status:"ready"}},12210:(e,t,i)=>{"use strict";i.d(t,{Ll:()=>c,S0:()=>o,pS:()=>l,q9:()=>d});var n=i(79683),a=i(4742),r=i(48288),s=i(28547);let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"var(--card-color)";if(!e)return{};let s=0==t?e:(0,r.x)(e);return{"--shape-bg-color-override":0===t?void 0:1===t?e:a.hQ?(0,n.$3)(e,t):"color-mix(in oklab, ".concat(e," ").concat(100*t,"%, ").concat(i,")"),"--shape-border-color-override":s}},o=e=>{if(!e)return{textColor:void 0,textColorVars:void 0};let t=(0,n.$p)(e)?"#fff":"#000",i=c(t);return{textColor:t,textColorVars:i}},c=e=>{if(e)return{"--shape-text-color":e,"--shape-fill-text-color":e,"--body-color":e,"--heading-color":e,"--link-color":e,"--link-color-inverted":(0,n.$p)(e)?"#fff":"#000","--link-color-hover":(0,n.$p)(e)?(0,n.Zt)(e,10):(0,n.Zt)(e,-10)}},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return;let i=l(e,t);if(0===t)return i;let{textColor:n,textColorVars:a}=o(e),r=n?(0,s.U2)(n):void 0;return{...i,...a,...r}}},12259:(e,t,i)=>{"use strict";i.d(t,{Rs:()=>c,WZ:()=>d,bW:()=>p});var n=i(77650),a=i(33612),r=i.n(a),s=i(26533),l=i(41626),o=i(35859);let c=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5;return e.filter(e=>{let[a,{scale:s}]=e;return[...s.values()].map(e=>r().readability(e,t)).reduce((e,t)=>Math.max(e,t),0)>=n||a===i})},d=(e,t)=>Object.entries({default:{...e[o.gb],label:()=>t},...e}).sort((e,t)=>{let[i]=e,[n]=t,a=e=>"default"===e?0:"theme"===e?1:"monochrome"===e?2:e.startsWith("monochrome-")?2+parseInt(e.split("-")[1],10)/100:"alternating"===e?3:"spin"===e?4:"complement"===e?5:"complement2"===e?6:999;return a(i)-a(n)});function p(e){let{chartColorSchemes:t,useNewChartingColorSet:i,themeAccentColors:a,steps:r=5,theme:o,accentColor:c}=e,d={},p=Array(r).fill(0).map((e,t)=>t);return Object.entries(t).filter(e=>{let[t]=e;return"monochrome"!==t&&("theme"!==t||i&&a.length>=3)}).forEach(e=>{let[t,{label:i}]=e;d[t]={label:i,scale:(0,l.M9)(c,p,t,{theme:o})}}),((e,t,i)=>{let a=(0,s.CD)(e),r=[],o=t?a:[a[0]].filter(Boolean);if(o.length>0&&o.forEach((e,t)=>{let a=(0,s.Ik)(e);r.push({key:0===t?"monochrome":"monochrome-".concat(t+1),label:()=>0===t?n.Ru._({id:"VvdC4u"}):n.Ru._({id:"oC5JOi",values:{monochromeNumber:t+1}}),scale:(0,l.M9)(a,i,"monochrome"),interpolate:e=>(0,l.yv)(a,e)})}),t&&a.length<=1){let e=+(a.length>0);l.Cf.forEach((t,a)=>{let s=e+a,o=0===s?"monochrome":"monochrome-".concat(s+1),c=s+1;r.some(e=>e.key===o)||r.push({key:o,label:()=>0===s?n.Ru._({id:"VvdC4u"}):n.Ru._({id:"oC5JOi",values:{monochromeNumber:c}}),scale:(0,l.M9)(t,i,"monochrome"),interpolate:e=>(0,l.yv)(t,e)})})}return r})(o,i,p).forEach(e=>{d[e.key]={label:e.label,scale:e.scale,interpolate:e.interpolate}}),d}},12393:(e,t,i)=>{"use strict";i.d(t,{us:()=>d,Z7:()=>l,jt:()=>c,Vr:()=>g,OP:()=>h,xV:()=>o,yw:()=>p,jp:()=>u});var n=i(84462),a=i.n(n),r=i(50998),s=i.n(r);let l=a()((e,t,i)=>{let n="__react_svg_text_measurement_id_gamma";i=null!=i?i:document.body;try{let a=document.getElementById(n);if(!a){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.top="-100%",e.style.left="-100%",(a=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("id",n),e.appendChild(a),i.appendChild(e)}let r=a.ownerSVGElement;r&&r.parentNode&&r.parentNode!==i&&(r.parentNode.removeChild(r),i.appendChild(r)),Object.assign(a.style,t),a.textContent=e;let s=a.getBoundingClientRect();return{width:a.getComputedTextLength(),height:s.height}}catch(e){return null}}),o=(e,t)=>{let i=e.length,n=Array(i);return e.forEach((e,a)=>{n[(a+t)%i]=e}),n},c=e=>e?1:16;function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,i=window.getComputedStyle(e).fontSize;if(!i)return t;let[n,a]=(()=>{let e=i.split(""),n=e.findIndex(e=>e.match(/[a-z]/i));return -1===n?["".concat(t),"px"]:[e.splice(0,n).join(""),e.join("")]})();return"px"!==a.toLowerCase()?t:Number.parseFloat(n)}function p(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=Math.abs(e),a=n%t,r=n-a;return 0===a?e:i*(e<0?-1:1)==-1||0===i&&am)))for(let i of f){if(!i.detectNode(e))continue;let l=i.getNodeId(e);if(!l)continue;let c={docId:d||t.gammaDocId,workspaceId:o||t.gammaOrgId||(0,r.gx)(),interactionId:a,theme:n,cardDimensions:x,imageStore:b,traceparent:s},p=i.getCacheKey(e,c);if(y.has(p)){L(t,l,i,y.get(p));continue}if(v.has(p)){v.get(p).then(e=>{L(t,l,i,e)});continue}let u=i.processNode(e,c);v.set(p,u),u.then(n=>{y.set(p,n),L(t,l,i,n),w.emit("processed",{node:e,attrs:n,processor:i,interactionId:c.interactionId,docId:c.docId})});break}})},A=async e=>{let{editor:t,content:i,theme:n,interactionId:r,workspaceId:s,docId:l,traceparent:o,cardDimensions:c}=e,d=a.bP.fromJSON(t.state.schema,i);k({editor:t,rootNode:d,theme:n,interactionId:r,traceparent:o,workspaceId:s,docId:l,cardDimensions:c})},L=(e,t,i,a)=>{let r=(0,n.xe)(e.state.doc,e=>i.getNodeId(e)===t)[0];if(!r)return void console.error("[updateAsyncNodeAttrs] Could not find node with id=".concat(t));let s=e.chain();s.updateAttributesAtPos(r.pos,a),s.noUndo&&s.noUndo(),s.run()}},35481:(e,t,i)=>{"use strict";i.d(t,{f:()=>r});var n=i(63867),a=i(43962);let r=(e,t)=>new n.k_({key:new n.hs("".concat(e.name,"_markview")),props:{nodeViews:{[e.name]:(i,n,r,s)=>(0,a.g)(t,{contentDOMElementTag:"span",as:"span"})({editor:e.editor,node:i,getPos:r,decorations:s,extension:{name:e.name,type:e.type.name,options:e.options,storage:e.storage},HTMLAttributes:{}})}}})},35665:(e,t,i)=>{"use strict";i.d(t,{DN:()=>a,LF:()=>s});var n=i(90158),a=function(e){return e.CREATE_COMMENT_FROM_SELECTION="createCommentFromSelection",e.OPEN_POPUP_COMMENT="openPopupComment",e.POPUP_COMMENT_TOGGLED="popupCommentToggled",e.OPEN_THEME_DRAWER="openThemeDrawer",e.OPEN_PAGE_SETUP="openPageSetup",e.OPEN_PRESENT_MODE_CONTEXT_MENU="openPresentModeContextMenu",e.Y_DOC_IS_TOO_LARGE="yDocIsTooLarge",e}({});class r extends n.b{}let s=new r},35859:(e,t,i)=>{"use strict";i.d(t,{PH:()=>d,SM:()=>g,UG:()=>c,XD:()=>x,fA:()=>h,gb:()=>m});var n=i(6029),a=i(2241),r=i(99492),s=i(55597),l=i(48621),o=i(77650);let c=.25*!i(4742).D1,d={top:0,right:0,bottom:0,left:0},p={monochrome:{label:()=>o.Ru._({id:"VvdC4u"})},spin:{label:()=>o.Ru._({id:"0LFzg9"})},complement:{label:()=>o.Ru._({id:"2HDXEj"})},complement2:{label:()=>o.Ru._({id:"XTxqsS"})},alternating:{label:()=>o.Ru._({id:"K+2OGd"})}},u={monochrome:{label:()=>o.Ru._({id:"VvdC4u"})},alternating:{label:()=>o.Ru._({id:"K+2OGd"})},theme:{label:()=>o.Ru._({id:"FEr96N"})},spin:{label:()=>o.Ru._({id:"0LFzg9"})},complement:{label:()=>o.Ru._({id:"2HDXEj"})},complement2:{label:()=>o.Ru._({id:"XTxqsS"})}},h={...p,...u},g=e=>e?u:p,m="monochrome",x=Object.freeze({pie:{icon:(0,n.jsx)(l.g,{icon:r.W1p}),selectedIcon:(0,n.jsx)(l.g,{icon:s.W1p}),label:()=>o.Ru._({id:"RT6aCN"})},donut:{icon:(0,n.jsxs)(a.B.span,{className:"fa-layers fa-fw",children:[(0,n.jsx)(l.g,{icon:r.xD0}),(0,n.jsx)(l.g,{icon:r.ZPt})]}),selectedIcon:(0,n.jsxs)(a.B.span,{className:"fa-layers fa-fw",children:[(0,n.jsx)(l.g,{icon:s.xD0}),(0,n.jsx)(l.g,{icon:r.ZPt})]}),label:()=>o.Ru._({id:"Cn5cfQ"})},line:{icon:(0,n.jsx)(l.g,{icon:r.gK3}),selectedIcon:(0,n.jsx)(l.g,{icon:s.gK3}),label:()=>o.Ru._({id:"MZW+2G"})},bar:{icon:(0,n.jsx)(l.g,{icon:r.s67}),selectedIcon:(0,n.jsx)(l.g,{icon:s.s67}),label:()=>o.Ru._({id:"EzalDc"})},"horizontal-bar":{icon:(0,n.jsx)(l.g,{icon:r.Mkm}),selectedIcon:(0,n.jsx)(l.g,{icon:s.Mkm}),label:()=>o.Ru._({id:"CeeoKy"})}})},36063:(e,t,i)=>{"use strict";i.d(t,{C:()=>g});var n=i(55729),a=i(7680),r=i(2420),s=i(67025),l=i(44732),o=i(94260),c=i(57489),d=i(78734),p=i(87489),u=i(42116),h=i(28680);let g=()=>{var e;let{product:t,subscription:i,openUpsellModal:g}=(0,o.I)(),m=null!=(e=(0,c.GV)(s.qj))?e:0,x=(0,c.GV)(h.qz),f=(0,c.GV)(p.sX),b=(0,c.GV)((0,r.pn)(f)),C=(0,a.r)("buddy-chat",{plan:null!=t?t:"free"})?m:1e3,{isDismissed:v,dismissWarning:y}=(()=>{let[e,t]=(0,u.M)("lowCreditsWarningDismissed",null),i=(0,n.useCallback)(()=>!!e&&(!(Date.now()-e>864e5)||(t(null),!1)),[e,t]),a=(0,n.useCallback)(()=>{t(Date.now())},[t]);return{isDismissed:i(),dismissWarning:a}})(),w="ok";C<=0?w="out":C<=200&&!v&&(w="low");let k="not-full";x>18e4?k="full":x>15e4&&(k="almost-full");let A=null;b?A="stillStreaming":"out"===w?A="credits":"full"===k&&(A="contextWindow");let L=null;if(null==i?void 0:i.nextCreditRefillTime){let e=new Date(i.nextCreditRefillTime),t=new Date;L=Math.ceil((e.getTime()-t.getTime())/864e5)}let j=t?null:{key:"plus",name:l.Ft},E="refill",S=null;return j&&(E="upgrade",S=j.name),{availableCredits:C,contextWindowStatus:k,creditStatus:w,tokensUsed:x,product:t,subscription:i,upsellType:E,upsellPlanName:S,daysToNextCredit:L,openUpgradeModel:(0,n.useCallback)(()=>{j&&g({segmentEvent:d.VV.GAMMA_UPSELL_CALLOUT_AI_CREDITS_BUDDY_EDIT_CHAT,upsellLocation:"credits.buddyEditChat",targetFeature:"unlimited_credits"})},[g,j]),dismissLowCreditsWarning:y,disabledReason:A}}},36465:(e,t,i)=>{"use strict";i.d(t,{c:()=>u});var n=i(81278),a=i(55729),r=i(1319),s=i(22199),l=i(57489),o=i(70077),c=i(80621),d=i(6139),p=i(74048);let u=e=>{let{url:t,nonPublishedUrl:i}=e,{push:u}=(0,n.useRouter)(),h=(0,o.En)(),g=(0,l.GV)(r.Jo),m=(0,d.oR)(),x=(0,l.GV)(s.C),f=m?(0,c.M7)({url:t,doc:g,previewEnabled:x}):i||t,b=h&&(0,c.uH)(t,g),C=(0,a.useCallback)(e=>{(0,p.jv)(f)&&(e.preventDefault(),u(f,void 0,{shallow:!0}))},[f,u]);return(0,a.useMemo)(()=>({linkUrl:f,handleClick:x?C:void 0,isCurrentPage:b}),[C,f,x,b])}},36939:(e,t,i)=>{"use strict";i.d(t,{j:()=>p});var n=i(51684),a=i(99492);i(77650);var r=i(8141),s=i(15726),l=i(13796),o=i(85851),c=i(55351),d=i(19451);let p={bing:"image.bing",giphy:"image.giphy",google:"image.google",web:"image.web",unsplash:"image.unsplash",pexels:"image.pexels",lexica:"image.lexica",aiGenerated:"image.ai-generated",fontawesome:"image.icon",pictographic:"image.pictographic",pictographicIcons:"image.pictographic.icon",none:"image.none",placeholder:"image.placeholder",accentTheme:"accent.theme"};c.a,l.X,d.R,r.U,o.x,s.P,a.sAw,a.Dfk,n.yvG},37548:(e,t,i)=>{"use strict";i.d(t,{Y:()=>u});var n=i(6029),a=i(88516),r=i(58959),s=i(8099),l=i(16936),o=i(38036),c=i(99492),d=i(48621),p=i(77650);let u=e=>{let{value:t,setValue:i,min:u,max:h,step:g=1,decrementTooltip:m,incrementTooltip:x,isDecrementTooltipDisabled:f=!0,isIncrementTooltipDisabled:b=!0,isDisabled:C=!1,isInputReadOnly:v=!1,inputMaxW:y,containerW:w}=e,{getInputProps:k,getIncrementButtonProps:A,getDecrementButtonProps:L}=(0,a.h)({step:g,min:u,max:h,value:t,onChange:e=>{let t=Number(e);isNaN(t)||th||i(t)}});return(0,n.jsxs)(r.z,{w:w,children:[(0,n.jsx)(s.m,{label:m,isDisabled:f,hasArrow:!0,placement:"top",children:(0,n.jsx)(l.K,{...L(),isDisabled:C,"aria-label":p.Ru._({id:"JvTdAL"}),icon:(0,n.jsx)(d.g,{icon:c.EZy}),rounded:"md",variant:"plain"})}),(0,n.jsx)(o.p,{...k(),maxW:y,px:0,textAlign:"center",isReadOnly:v}),(0,n.jsx)(s.m,{label:x,isDisabled:b,hasArrow:!0,placement:"top",children:(0,n.jsx)(l.K,{...A(),"aria-label":p.Ru._({id:"kdkZBD"}),icon:(0,n.jsx)(d.g,{icon:c.QLR}),rounded:"md",variant:"plain"})})]})}},37848:(e,t,i)=>{"use strict";function n(e,t){if(null!=e)return e;let i=Error(void 0!==t?t:"Got unexpected "+e);throw i.framesToPop=1,i}i.d(t,{Z:()=>n})},38089:(e,t,i)=>{"use strict";i.d(t,{f:()=>p});var n=i(6029),a=i(80314),r=i(64268),s=i(51504),l=i(57405),o=i(48810),c=i(3616),d=i(59534);let p=e=>{let{updateYourBillingInformationReason:t}=e,i=(0,d.U)();if(!i.isPaymentOverdue)return null;let{billingAdminDisplayName:p}=i,u=(0,n.jsx)(c.x6,{id:"wg3zrp",components:{0:(0,n.jsx)(a.N,{href:i.updateYourBillingInfoHref,onClick:i.updateYourBillingInfoOnClick,isExternal:!0,textDecoration:"underline"})}}),h=(0,n.jsx)(c.x6,{id:"nK/p5s",values:{billingAdminDisplayName:p}});return(0,n.jsxs)(r.F,{status:"error",children:[(0,n.jsx)(s._,{}),(0,n.jsxs)(l.T,{alignItems:"start",children:[(0,n.jsxs)(o.E,{children:[(0,n.jsx)(c.x6,{id:"TuwbmO"})," ",i.isCurrentUserBillingAdmin?u:h]}),t]})]})}},38359:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});let n=new(i(90158)).b},38377:(e,t,i)=>{"use strict";i.d(t,{Dn:()=>o,r4:()=>s,vf:()=>l});var n=i(99492),a=i(55597),r=i(77650);let s=3,l=()=>[{name:r.Ru._({id:"bjuYAW"}),key:"solid",icon:a.Cpz},{name:r.Ru._({id:"bCuf07"}),key:"outline",icon:n.Cpz},{name:r.Ru._({id:"1lWK8g"}),key:"link",icon:n.CQO}],o={buttonGroup:{alignEnabled:!0,colorEnabled:!0,linkDropdownEnabled:!0,variants:["solid","outline"],defaultVariant:"solid"},navbarButtons:{alignEnabled:!1,colorEnabled:!0,linkDropdownEnabled:!1,variants:["solid","outline"],defaultVariant:"solid"},navbarLinks:{alignEnabled:!0,colorEnabled:!1,linkDropdownEnabled:!1,variants:["link"],defaultVariant:"link"}}},38745:(e,t,i)=>{"use strict";i.d(t,{L:()=>o,X:()=>l});var n=i(55729),a=i(5302),r=i(18629);let s=["GetSavedMedia","GetUserSavedMedia","GetWorkspaceSavedMedia"],l=e=>{var t;let{docId:i,themeId:r,interactionId:l,scope:c="legacy",count:d=18,savedMediaContext:p}=e,{data:u,loading:h,fetchMore:g}=o({scope:c,docId:i,themeId:r,interactionId:l,count:d,savedMediaContext:p}),m=(0,n.useMemo)(()=>{switch(c){case"user":return"userSavedMedia";case"doc":return"workspaceSavedMedia";default:return"savedMedia"}},[c]),x=(0,n.useMemo)(()=>{var e;return((null==u||null==(e=u[m])?void 0:e.edges)||[]).map(e=>e.node)},[u,m]),f=null==u||null==(t=u[m])?void 0:t.pageInfo,[b,C]=(0,n.useState)(!1),v=(0,n.useCallback)(async()=>{if((null==f?void 0:f.hasNextPage)&&(null==f?void 0:f.endCursor)){C(!0);try{await g({variables:{after:f.endCursor},updateQuery:(e,t)=>{var i,n;let{fetchMoreResult:a}=t;if(!a)return e;let r=(null==(i=a[m])?void 0:i.edges)||[],s=[...(null==(n=e[m])?void 0:n.edges)||[],...r];return{...e,[m]:{...a[m],edges:s}}}})}catch(e){console.error("Error loading more images:",e)}finally{C(!1)}}},[g,f,m]),[y,w]=(0,n.useState)(null),[k,A]=(0,n.useState)(!1),[L,j]=(0,n.useState)(!1),[E]=(0,a.GQw)(),[S]=(0,a.t77)(),[M]=(0,a.sIv)(),I=(0,n.useCallback)(async e=>{w(e),A(!0);try{await E({variables:{id:e},update:t=>{t.evict({id:t.identify({id:e,__typename:"SavedMedia"})}),t.gc()},refetchQueries:s})}catch(e){console.error("Error deleting image:",e)}finally{w(null),A(!1)}},[E]),_=(0,n.useCallback)(async e=>{try{await M({variables:{ids:e},refetchQueries:s})}catch(e){console.error("Error unarchiving images:",e)}},[M]),D=(0,n.useCallback)(async e=>{let t=!1;j(!0);try{await S({variables:{ids:e},update:t=>{e.forEach(e=>{t.evict({id:t.identify({id:e,__typename:"SavedMedia"})})}),t.gc()},refetchQueries:s})}catch(e){console.error("Error deleting images:",e),t=!0}finally{j(!1)}return t?{success:!1}:{success:!0,undo:()=>_(e)}},[S,_]);return{history:x,loadMore:v,isLoadingMore:b,canLoadMore:!!(null==f?void 0:f.hasNextPage),isLoading:h,deleteImage:I,deletingId:y,isDeleting:k,isDeletingMany:L,deleteMany:D}},o=e=>{let{scope:t,interactionId:i,docId:n,themeId:s,count:l=18,savedMediaContext:o}=e,c={workspaceId:(0,r.x)(o),types:[a.zut.Image],sources:["image.ai-generated","image.ai-edited"],first:l,...i?{interactionId:i}:{}},d={type:a.zut.Image,source:"image.ai-generated",first:l},p={...n?{docId:n}:{},...s?{themeId:s}:{}},u=(0,a.abJ)({variables:{...c},fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first",skip:"user"!==t}),h=(0,a.Gc5)({variables:{...c,...p},fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first",skip:"doc"!==t}),g=(0,a.N3Q)({variables:{...d,...p},fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first",skip:"legacy"!==t});return"user"===t?u:"doc"===t?h:g}},38791:(e,t,i)=>{"use strict";i.d(t,{J:()=>s,f:()=>r});var n=i(94289),a=i(22670);let r=e=>{let{editor:t,content:i,operation:a="insert"}=e,r=Array.isArray(i)?i:[i],s=n.Ji.fromJSON(t.schema,{content:r});t.view.dragging={slice:s,move:!0,operation:a},t.commands.setTextSelection(t.state.selection.from)},s=(e,t)=>{a.zS.track(a.VV.NODE_INSERTED,{node_name:e.nodeName,command:e.key,method:t}),"card"===e.nodeName&&a.zS.track(a.VV.CARD_CREATED,{method:t,command:e.key})}},39027:(e,t,i)=>{"use strict";i.d(t,{R:()=>y});var n=i(6029),a=i(53996),r=i(26420),s=i(21938),l=i(51684),o=i(48621),c=i(31241),d=i(77650),p=i(55729),u=i(45588),h=i(51203),g=i(57489),m=i(52239),x=i(5314),f=i(87489),b=i(3898),C=i(43986),v=i(85220);let y=e=>{let{image:t,iconSize:i,boxProps:p,number:u,selectCell:h,placeholderIfEmpty:g,isNumbered:x,textAlign:f,fontWeight:v,color:y="currentColor"}=e,{hasIcon:k,handleChangeIcon:A,isEditable:L}=w({image:t,selectCell:h}),j=g&&!k,E=x&&!k;return(0,n.jsx)(c.Tz,{placement:"top",label:k?d.Ru._({id:"yBP2Ki"}):d.Ru._({id:"zFIUaq"}),isDisabled:!L||E,children:(0,n.jsxs)(a.o,{className:(0,s.cx)("image"),h:"calc(1em * var(--line-height-heading))",w:"1em",fontSize:"".concat(i,"em"),fontWeight:v,textAlign:f,role:"group",pos:"relative","data-smart-layout-image-drop-target":"true",onClick:L&&!E?A:void 0,css:(0,m.t)(y),...p,children:[k?(0,n.jsx)(C.s,{image:t}):u?"".concat(u):null,(L&&!E||j)&&!(0,b.nr)()&&(0,n.jsx)(r.a,{bg:"var(--placeholder-button-bg-color)",color:"var(--placeholder-button-text-color)",opacity:+!!j,_groupHover:{opacity:1},pos:"absolute",fontSize:"0.8em",p:"0.5em",borderRadius:"md",cursor:"pointer",children:(0,n.jsx)(o.g,{icon:l.cCs,fixedWidth:!0})})]})})},w=e=>{let{image:t,selectCell:i,disableEditing:n}=e,a=(0,g.GV)(f.nD)&&!n&&i,r=(null==t?void 0:t.src)||(null==t?void 0:t.tempUrl),{setMediaDrawerSourceKeyAction:s}=(0,v.B)();return{hasIcon:r,handleChangeIcon:(0,p.useCallback)(e=>{e.stopPropagation(),null==i||i();let n=u.of.get("pictographicIconsSearch")?h.un.key:h.fo.key;s((null==t?void 0:t.source)||n,!0),setTimeout(()=>{(0,x.G)(!1)},30)},[i,s,null==t?void 0:t.source]),isEditable:a}}},39150:(e,t,i)=>{"use strict";i.d(t,{P:()=>a,T:()=>n});let n="non-clickable",a={clipType:null,clipPath:null,clipAspectRatio:null,width:null}},39239:(e,t,i)=>{"use strict";i.d(t,{a:()=>g,h:()=>m});var n=i(21938),a=i(37243),r=i(63867),s=i(97255),l=i(45588),o=i(20044);class c extends r.k_{removeOverlappingDecorations(e,t){let i=this.getDecorationsRanges(t),n=e.find(i.from,i.to).filter(e=>i.hasRange(e));return e.remove(n)}getDecorationsRanges(e){let t=1/0,i=-1/0,n=new Set;return e.forEach(e=>{let{from:a,to:r}=e;a Item u||t.clientX>s.left+s.width/2);let h=r.querySelector("[data-test-column-control]");return{pos:0,side:n?"right":"left",rect:c,colNumber:h?parseInt(h.getAttribute("data-test-column-control")||"0",10):0,tableNode:null}})(this.editorView,e);return t?(this.setCursor({...t,type:"tableColumn"}),this.scheduleRemoval(5e3)):this.setCursor(null),!0}return!1}dragover(e){var t,i,n,a,r,s,l,o,c,d,p,u,h;if(!this.editorView.editable||this.checkTableColumnDragEvent(e))return;let g=dL(this.editorView,e,null==(t=this.editorView.dragging)?void 0:t.slice);if(g){this.setCursor({...g,type:"gridItem"}),this.scheduleRemoval(5e3);return}let m=(0,dx.nA)(this.editorView,e,null==(i=this.editorView.dragging)?void 0:i.slice);if(m){this.setCursor({...m,type:"blankRect"}),this.scheduleRemoval(5e3);return}let x=(0,dI.fc)(this.editorView,e,null==(n=this.editorView.dragging)?void 0:n.slice);if(x){this.setCursor({...x,type:"blankRect"}),this.scheduleRemoval(5e3);return}if((0,dj.Vk)(this.editorView,e,null==(a=this.editorView.dragging)?void 0:a.slice))return void this.scheduleRemoval(20);let f=(0,dS.i)(this.editorView,e,null==(r=this.editorView.dragging)?void 0:r.slice,(null==(s=this.editorView.dragging)?void 0:s.operation)||"insert");if(f)return void this.setCursor({type:"replaceImage",pos:f.pos,rect:f.rect,node:f.node});let b=(0,cR.tz)(this.editorView,e,null==(l=this.editorView.dragging)?void 0:l.slice,!this.editorView.dragging);if(b){this.setCursor({...b,type:"gallery"}),this.scheduleRemoval(5e3);return}let C=(0,dE.ds)(this.editorView,e,null==(o=this.editorView.dragging)?void 0:o.slice);if(C){this.setCursor({...C,type:"column"}),this.scheduleRemoval(5e3);return}let v=(0,dx.ZL)(this.editorView,e,null==(c=this.editorView.dragging)?void 0:c.slice);if(v){this.setCursor({...v,type:"blankRect"}),this.scheduleRemoval(5e3);return}let y=(0,dI.TS)(this.editorView,e,null==(d=this.editorView.dragging)?void 0:d.slice);if(y){this.setCursor({...y,type:"smartLayoutVariant"}),this.scheduleRemoval(5e3);return}let w=(0,dI.eL)(this.editorView,e,null==(p=this.editorView.dragging)?void 0:p.slice);if(w){this.setCursor({...w,type:"smartLayout"}),this.scheduleRemoval(5e3);return}let k=(0,lB.M7)(this.editorView,e,null==(u=this.editorView.dragging)?void 0:u.slice);if(k){this.setCursor({pos:k.pos,type:"default"}),this.scheduleRemoval(5e3);return}let A=(0,d_.M)(this.editorView,e,null==(h=this.editorView.dragging)?void 0:h.slice);null===A?this.setCursor(null):(this.setCursor({pos:A,type:"default"}),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}constructor(e,t){this.cursor=null,this.element=null,this.timeout=null,this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let i=e=>this[t](e);return e.dom.addEventListener(t,i),{name:t,handler:i}}),this.dragover=dm()(this.dragover,100,{trailing:!1}).bind(this)}}let dR=n.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:null}),addProseMirrorPlugins(){return[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new U.k_({key:new U.hs("dropCursor"),view:t=>new dD(t,e)})}(this.options)]}}).configure({color:"var(--chakra-ring-color)",width:3,class:"ProseMirror-dropcursor"});var dT=i(93766),dz=i(49854);let dH=e=>{let{svg:t,isDark:i,font:n}=e,a=(0,_.useMemo)(()=>(0,dz.k)(i),[i]),r=(0,_.useMemo)(()=>(0,dz.I)(n),[n]);return t?(0,h.jsx)(g.a,{dangerouslySetInnerHTML:{__html:t},"data-testid":"drawing-svg",sx:{svg:{width:"100%",height:"auto",text:r,...a}}}):null};var dB=i(57841);let dN=["tl-centered-g"],dP=async e=>{let t=await e.getSvg(e.shapes.map(e=>e.id),{padding:1});if(t)return dN.forEach(e=>{var i;null==(i=t.querySelector(".".concat(e)))||i.classList.remove(e)}),t.querySelectorAll(":not(mask)[id]").forEach(e=>e.removeAttribute("id")),t},dF=e=>{let{isOpen:t,isEditable:i,onClose:n,font:a,isDark:r,isDrawingEditorActive:s,setDrawingEditorActive:l,...o}=e,{node:c,updateAttributes:d}=o,{page:p,assets:u}=c.attrs,[g,m]=(0,_.useState)();(0,_.useEffect)(()=>{(0,cA.IN)(g,p,u)},[p,u,g,d]);let x=(0,_.useCallback)(e=>{m(e),window.tldrawEditor=e,(0,cA.Wp)(e,!0)},[]),f=(0,_.useCallback)(async()=>{if(!g)return;let e=await dP(g);if(!e)return;d({svg:e.outerHTML});let t=JSON.stringify({page:g.document.pages.page,assets:g.document.assets});console.debug("[DrawingEditor] Generated SVG",{svgSize:e.outerHTML.length,jsonSize:t.length,svgEl:e})},[g,d]),b=(0,_.useCallback)(()=>{g&&d({page:g.document.pages.page,assets:g.document.assets})},[d,g]),C=(0,eR.lW)(b,500),v=(0,_.useCallback)(()=>{i&&f(),l(!1),n()},[n,f,l,i]);return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(em._s,{placement:"bottom",onClose:v,isOpen:t,trapFocus:!0,isFullHeight:!0,returnFocusOnClose:!1,children:[(0,h.jsx)(em.QP,{}),(0,h.jsxs)(em.zj,{borderTopRadius:"xl",h:"calc(var(--100vh) - 24px)",onAnimationComplete:e=>{"enter"==e&&l(!0)},transition:{enter:{duration:.4}},children:[(0,h.jsx)(em.ys,{p:0,h:"100%",overflow:"hidden","data-testid":"drawing-editor-body",children:s?(0,h.jsx)(dB.UG,{readOnly:!i,showPages:!1,onMount:x,onChangePage:i?C:void 0,autofocus:!1,isDark:r,font:a}):(0,h.jsx)(e5.s,{align:"center",justify:"center",w:"100%",h:"100%",children:(0,h.jsx)(tA.y,{size:"xl"})})}),(0,h.jsx)(em.s1,{zIndex:2,backgroundColor:"white","data-testid":"drawing-editor-close"})]})]})})},dV=(0,ok.P)(g.a),dO=e=>{let{node:t,updateAttributes:i,selected:n,editor:a,getPos:r,decorations:s}=e,{width:l,meta:o,id:c,horizontalAlign:d,svg:p,page:u}=t.attrs,f=(0,Q.GV)(ep.Cl),b=(0,Q.GV)(ep.Ik),C=(0,ed.CJ)(a),v=f&&C&&b,y=(0,Q.GV)(ep.Xu),w=!!y&&y===c,[k,A]=(0,_.useState)(!1),L=(0,Q.GV)(ep.SJ),{isDark:j}=(0,iS.mm)(L),E=(0,iE.ZI)(L)["--body-font"],{ref:S,setIsResizing:M,resizeableSx:D,onLayoutAnimationStart:R,onLayoutAnimationComplete:T}=(0,o5.Y3)(a),z=(0,_.useCallback)(()=>{(0,cA.CD)(c,!0)},[c]),H=(0,_.useCallback)(()=>{let e=r();"number"==typeof e&&a.chain().setNodeSelection(e).focus().run()},[a,r]),B=(0,_.useCallback)(()=>{(0,cA.CD)(null,!1)},[]),N=(0,_.useCallback)((e,n)=>{i({...t.attrs,fullWidthBlock:void 0===n?t.attrs.fullWidthBlock:n,...e})},[t.attrs,i]),P=l||(null==o?void 0:o.width),F=!p,V=u&&Object.keys(u.shapes).length>0,{isFullWidth:O}=(0,ck.D)(s),Z=(0,x.yp)(O?"center":d);return(0,h.jsx)(m.u,{...e,as:"div",children:(0,h.jsxs)(e5.s,{w:"100%",className:o3.S,css:Z,sx:D,direction:"column",_focusWithin:{shadow:"outline"},children:[(0,h.jsxs)(dV,{ref:S,className:"drawing",borderRadius:"var(--box-border-radius)","data-content-reference":!0,"data-selection-ring":!0,"data-selection-background":!0,w:O?"100%":P?"calc(".concat(P," * var(--font-size) / 16)"):"100%",maxW:"100%",h:"auto",position:"relative",layout:!0,layoutDependency:d,transition:{duration:.15},onLayoutAnimationStart:R,onLayoutAnimationComplete:T,minH:F?"6em":"auto","data-drag-handle":!0,children:[v&&n&&!O&&(0,h.jsx)(o5.u4,{imageWrapperRef:S,setIsResizing:M,updateResizeAttrs:N,refreshDeps:[t.attrs]}),!k&&(0,h.jsx)(dH,{font:E,svg:p,isDark:j}),v&&!w&&!F&&(0,h.jsx)(g.a,{cursor:"default",position:"absolute",inset:"0",zIndex:"1",onClick:H,onDoubleClick:z}),F&&(0,h.jsxs)(eh.T,{spacing:3,justify:"center",contentEditable:!1,color:"gray.400",h:32,backgroundColor:"blackAlpha.50",borderRadius:"var(--box-border-radius)","data-testid":"drawing-placeholder",children:[(0,h.jsx)(I.g,{size:"2x",icon:e0.qTS}),f&&(0,h.jsx)(eK.$,{size:"xs",onClick:z,children:V?"Open diagram":"Add diagram"})]})]}),w&&(0,h.jsx)(dF,{...e,isOpen:w,isEditable:f,onClose:B,isDark:j,font:E,isDrawingEditorActive:k,setDrawingEditorActive:A})]})})},dZ=new U.hs("UniqueMediaId"),dG=rP.S.extend({name:"UniqueDrawingId"}).configure({attributeName:"id",types:["drawing"],initialValue:cA.rZ,filterTransaction:rV.kz,pluginKey:dZ}),dU=n.bP.create({name:"drawing",group:"block",atom:!0,selectable:!0,draggable:!0,addAttributes:()=>({id:(0,rF.e)(cA.rZ),page:{...(0,X.tb)("page")},assets:{...(0,X.tb)("assets"),default:{}},meta:{...(0,X.tb)("meta"),default:{}},fullWidthBlock:{default:!1},width:{},svg:{}}),parseHTML:()=>[{tag:"div[class=drawing]"},{tag:"tldraw",getAttrs:e=>{try{let t=new dT.mf,i=JSON.parse(e.innerHTML);return t.insertContent(i,{select:!1}),{page:t.document.pages[t.currentPageId],assets:t.assets}}catch(t){return console.error("(caught) Error parsing Tldraw paste",t,e.innerHTML),!1}}},{tag:"drawing[bookmark]",getAttrs:ee.Ll}],renderHTMLforAI(e){let{node:t}=e;return["drawing",{bookmark:(0,ee.vL)(t)}]},renderHTML(e){let{HTMLAttributes:t}=e;return["div",(0,n.KV)(t,{class:"drawing"})]},addCommands(){return this.name,{editSelectedDrawingBlock:()=>e=>{let{state:t}=e,i=(e=>{let{selection:t}=e;return t instanceof U.nh&&("drawing"===t.node.type.name||"diagram"===t.node.type.name)?t.node:void 0})(t);return i&&(0,Q.KA)().dispatch((0,ep.v5)({drawingId:i.attrs.id})),!0}}},addExtensions:()=>[dG],addNodeView:()=>(0,p.gu)(dO,{update:u.z0})}),dW=n.YY.create({name:"dynamicNodes",extendNodeSchema(e){var t;return{dynamic:null!=(t=(0,n.gk)((0,n.iI)(e,"dynamic",e)))&&t}}}),dK=n.YY.create({name:"fixRequiredAttrs",onBeforeCreate(){Object.values(this.editor.schema.nodes).forEach(e=>{Object.values(e.attrs||{}).forEach(e=>{void 0===e.default&&(e.hasDefault=!1)})})}});var dQ=i(37524),dq=i(31794),dJ=i(99216);let d$=new U.k_({key:new U.hs("footnote"),appendTransaction:(e,t,i)=>{let{selection:a}=i;a.eq(t.selection)||(e=>{if("footnote"!==e.$anchor.doc.type.name&&!e.empty&&!(0,dJ.uI)(e)&&(0,n.eE)(e)){let e=(0,dJ.bk)();if(!e)return;let t=document.querySelector('[data-footnote-popover-id="'.concat(e,'"] .ProseMirror'));t&&t.contains(document.activeElement)||(0,dJ.Wj)(null,!1)}})(a);let r=i.tr;return((0,lH.z)(e,t,i,r),((e,t,i,a)=>{if(!e.some(e=>e.docChanged))return;let{doc:r}=i,s=[],l=[];r.nodesBetween(0,i.doc.content.size,(e,t,i)=>{"footnote"===e.type.name&&s.push({from:t,to:t+e.nodeSize,node:e,parent:i}),e.marks.forEach(n=>{"footnoteLabel"===n.type.name&&l.push({from:t,to:t+e.nodeSize,mark:n,parent:i})})}),l.filter(e=>{let{mark:t,parent:i}=e;return!s.find(e=>{let{node:n,parent:a}=e;return n.attrs.noteId===t.attrs.noteId&&a===i})}).forEach(e=>{let{from:t,to:i,mark:n}=e;return a.removeMark(t,i,n)});let o=e=>(0,n.I2)("footnoteLabel",i.schema).create({noteId:e});l.filter(e=>{let{mark:t}=e;return!t.attrs.noteId}).forEach(e=>{let{mark:t,from:i,to:n}=e,r=s.find(e=>{let{node:t,from:i}=e,a=i>=n,r=!l.find(e=>{let{mark:i}=e;return i.attrs.noteId==t.attrs.noteId});return a&&r});r&&a.removeMark(i,n,t).addMark(i,n,o(r.node.attrs.noteId))}),Object.entries(nv()(s,e=>{let{node:t}=e;return t.attrs.noteId})).forEach(e=>{let[t,i]=e;if(1==i.length||!t)return;let n=l.filter(e=>{let{mark:i}=e;return i.attrs.noteId===t});i.slice(1).forEach((e,t)=>{let{from:i}=e,r=(0,dJ.pN)();a.setNodeMarkup(i,void 0,{noteId:r});let s=n[t+1];s&&(a.removeMark(s.from,s.to,s.mark),a.addMark(s.from,s.to,o(r)))})})})(e,0,i,r),r.docChanged)?(console.debug("[FootnotePlugin] Applied steps",r.steps),r):null}});var dY=i(88136),dX=i(65282),d0=i(90237),d1=i(58731),d2=i(51705);let d3=(e,t,i)=>{let a=(0,Q.GV)(ep.DH);(0,ir.j)({ref:i,enabled:!!(i&&a===t),handler(e){var t,i;(null==(t=e.target)?void 0:t.closest("[data-footnote-view]"))||(null==(i=e.target)?void 0:i.closest("[data-footnote-label]"))||r(!1)}});let r=(0,_.useCallback)(i=>{var r,s;let l=e.state.selection,o=(0,n.eE)(l)&&!l.empty,c=(null==(r=document.activeElement)?void 0:r.closest(".footnote-popover"))||!!(null==(s=document.activeElement)?void 0:s.closest("[data-in-editor-focus]")),d=void 0!==i?i:a!==t;c||(d&&!o?(0,dJ.N3)(t,!0):!1===d&&(0,dJ.N3)(t,!1))},[e.state.selection,a,t]);return{onClick:r}},d5=e=>{let{node:t,editor:i,innerEditor:n,selected:a}=e,{noteId:r}=t.attrs,s=(0,_.useRef)(null),l=(0,Q.GV)(ep.DH),o=(0,Q.GV)(ep.Cl),c=(0,lW.oR)(),{onClick:d}=d3(i,r,s);(0,_.useEffect)(()=>{n&&n.setEditable(o)},[o,n]);let u=!!l&&l===r,m=(0,_.useCallback)(()=>(0,dJ.Wj)(r,!1),[r]);(0,_.useEffect)(()=>{if(!n)return;let e=()=>{setTimeout(()=>{(0,X.We)(n)||m()},20)};return n.on("blur",e),()=>{n.off("blur",e)}},[n,m]);let x=!(0,rr.NO)(i),f=(0,_.useCallback)(()=>{x&&d()},[x,d]);return(0,h.jsx)(p.VR,{as:"span","data-testid":"footnote-nodeview-wrapper",children:(0,h.jsxs)(th.A,{isOpen:u,onClose:m,placement:"top",gutter:8,isLazy:!0,lazyBehavior:"unmount",autoFocus:!1,closeOnBlur:!1,closeOnEsc:!1,returnFocusOnClose:!1,children:[(0,h.jsx)(tg.W,{children:(0,h.jsx)(S.E,{as:"span",onClick:f,_after:{content:"counter(footnote)",counterIncrement:"footnote",position:"relative",bottom:"0.6em",fontSize:"0.8em",shadow:a&&x?"outline":void 0,borderRadius:"sm"},pl:"1px",className:"footnote",contentEditable:!1,"data-footnote-view":!0,cursor:x?"pointer":void 0})}),x&&(0,h.jsx)(is.Z,{children:(0,h.jsxs)(tm.h,{zIndex:"popover",shadow:"md",borderRadius:"md",border:"1px solid",borderColor:"gray.200",w:"500px",maxW:"100vw","data-footnote-popover-test-id":r,p:0,ref:s,children:[(0,h.jsx)(dY.R,{}),(0,h.jsx)(tx.e,{position:"relative",zIndex:"1",p:0,className:"footnote-popover","data-footnote-popover-id":r,children:c?(0,h.jsx)(d9,{...e,onClose:m}):(0,h.jsx)(d6,{...e,editable:o,onClose:m})}),(0,h.jsx)(g.a,{position:"absolute",top:"-".concat(8,"px"),bottom:"-".concat(8,"px"),left:0,right:0,zIndex:"0"})]})})]})})},d4=sA()({},d0.q,{".ProseMirror":{px:8,py:4,overflow:"hidden auto",maxH:"300px",maxW:"100%",borderRadius:"md"}}),d6=e=>{let{editor:t,innerEditor:i,mountEditor:a,destroyEditor:r,node:s,editable:l,getPos:o,onClose:c}=e,{noteId:d}=s.attrs,u=(0,_.useCallback)(()=>t.commands.convertNoteToCard(d),[t,d]),m=(0,_.useCallback)(()=>{let e=o();"number"==typeof e&&t.chain().focus().setNodeSelection(e).deleteSelection().run()},[t,o]);(0,_.useEffect)(()=>{if(a&&r)return a(),()=>{r()}},[a,r]);let x=(0,Q.GV)(ep.SJ),f=(0,iE.ZI)(x,"#FFFFFF");if(!i)return null;let b=(0,n.xe)(t.state.doc,e=>e.marks.some(e=>"footnoteLabel"===e.type.name&&e.attrs.noteId===d)).length>0;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(g.a,{className:ec._P,sx:d4,position:"relative",_focusWithin:{shadow:l?"outline":void 0},borderRadius:"md",css:f,children:[(0,h.jsx)(p.$Z,{editor:i,className:"highlight-mask"}),(0,h.jsx)(d1.G,{editor:i}),(0,h.jsxs)(tD.e,{size:"sm",colorScheme:"gray",variant:"ghost",position:"absolute",right:4,top:2,onMouseDown:iu.Fw,spacing:0,children:[l&&(0,h.jsxs)(eQ.W,{autoSelect:!1,isLazy:!0,children:[(0,h.jsx)(eq.I,{as:eJ.K,icon:(0,h.jsx)(I.g,{icon:e0.Dwc}),minW:6,h:6,isRound:!0,backgroundColor:"white"}),(0,h.jsx)(is.Z,{children:(0,h.jsxs)(e$.c,{"data-in-editor-focus":!0,zIndex:"dropdown",children:[b&&(0,h.jsx)(eX.D,{icon:(0,h.jsxs)("span",{className:"fa-layers fa-fw",children:[(0,h.jsx)(I.g,{icon:e_.vti,fixedWidth:!0}),(0,h.jsx)(I.g,{icon:e_.dmS,inverse:!0,transform:"shrink-8"})]}),onClick:u,children:(0,h.jsx)(ex.x6,{id:"p/s15o"})}),(0,h.jsx)(eX.D,{icon:(0,h.jsx)(I.g,{icon:e0.yLS,fixedWidth:!0}),color:"red.500",onClick:m,children:(0,h.jsx)(ex.x6,{id:"sHHbXH"})})]})})]}),(0,h.jsx)(eJ.K,{"aria-label":e2.Ru._({id:"j+JKcM"}),icon:(0,h.jsx)(I.g,{icon:e0.GRI}),minW:6,h:6,isRound:!0,onClick:c,backgroundColor:"white"})]})]}),(0,h.jsx)(d2.Ht,{editor:i})]})},d9=e=>{let{mountEditor:t,destroyEditor:i,onClose:n}=e,a=(0,_.useMemo)(()=>{if(t)return t()},[t]);(0,_.useEffect)(()=>{if(i)return()=>i()},[i]);let r=(0,Q.GV)(ep.SJ),s=(0,iE.ZI)(r,"#FFFFFF");return a?(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(g.a,{className:ec._P,sx:d4,position:"relative",borderRadius:"md",css:s,children:[(0,h.jsx)(dX.N,{editor:a}),(0,h.jsx)(tD.e,{size:"sm",colorScheme:"gray",variant:"ghost",position:"absolute",right:4,top:2,onMouseDown:iu.Fw,spacing:0,children:(0,h.jsx)(eJ.K,{"aria-label":e2.Ru._({id:"j+JKcM"}),icon:(0,h.jsx)(I.g,{icon:e0.GRI}),minW:6,h:6,isRound:!0,onClick:n,backgroundColor:"white"})})]})}):null};var d7=i(35481);let d8=n.CU.create({name:"footnoteLabel",inclusive:!1,excludes:"link underline",priority:et.y.FootnoteLabel,parseHTML:()=>[{tag:"span[class=footnote-label][bookmark]",getAttrs:ee.Ll},{tag:"span[class=footnote-label]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["span",(0,n.KV)(t,{class:"footnote-label"}),0]},renderHTMLforAI(e){let{mark:t,disableBookmarks:i}=e;return i?["span",{class:"footnote-label",noteId:t.attrs.noteId},0]:["span",{class:"footnote-label",bookmark:(0,ee.vL)(t)},0]},addAttributes:()=>({noteId:{rendered:!1}}),addProseMirrorPlugins(){return[(0,d7.f)(this,pe)]}}),pe=e=>{let{node:t,editor:i,children:n}=e,{noteId:a}=t.attrs,r=(0,lW.oR)(),{onClick:s}=d3(i,a),l=!(0,rr.NO)(i),o=(0,_.useCallback)(()=>{l&&s()},[l,s]);return(0,h.jsx)(p.VR,{as:"span",className:"footnote-label-view",children:(0,h.jsx)(S.E,{as:"span",className:"footnote-label",onClick:o,"data-footnote-label":!0,cursor:l?"pointer":void 0,children:r?n:(0,h.jsx)(p.$p,{as:"span"})})})},pt=/(?:^|\s)((?:\^)((?:[^^]+))(?:\^))$/,pi=n.bP.create({name:"footnote",content:"(block | footnoteBlock)+",group:"inline",atom:!0,inline:!0,priority:et.y.Footnote,parseHTML:()=>[{tag:"span[class=footnote]",getContent:(e,t)=>sB.FK.fromJSON(t,JSON.parse(e.getAttribute("data-content")||"{}"))},{tag:"div[class=imported-footnote]"},{tag:"footnote[bookmark]",getAttrs:ee.Ll,getContent:ee.cn},{tag:"footnote[noteid]",getAttrs:e=>({noteId:e.getAttribute("noteid")})}],renderHTML(e){let{node:t,HTMLAttributes:i}=e;return["span",(0,n.KV)(i,{class:"footnote","data-content":JSON.stringify(t.content.toJSON())})]},renderHTMLforAI(e){let{node:t,disableBookmarks:i}=e;return i?["footnote",{noteId:t.attrs.noteId},0]:["footnote",{bookmark:(0,ee.vL)(t)}]},addAttributes:()=>({noteId:{parseHTML:e=>{let t=(0,ee.Ll)(e);return t&&t.noteId?t.nodeId:(0,dJ.pN)()},default:void 0}}),addNodeView:()=>lD(d5,{nodeName:"footnote",preventNodeOrExtensionTypes:["doc","document","card"]}),addInputRules(){var e;return[(e={find:pt,nodeType:this.type,markType:this.editor.schema.marks.footnoteLabel},new n.fV({find:e.find,handler:t=>{let{state:i,range:a,match:r}=t,{tr:s}=i,l=r[r.length-1],o=r[0],c=a.to;if(l){let t=o.search(/\S/),r=a.from+o.indexOf(l),d=r+l.length;if((0,n.hO)(a.from,a.to,i.doc).filter(t=>t.mark.type.excluded.find(i=>i===e.markType&&i!==t.mark.type)).filter(e=>e.to>r).length)return;d ').concat(e,"l+o)&&("document"===e.type.name||!n||this.decorateNode(i,e,t,n,a)))}constructor({key:e,decorateNode:t,options:i={}}){super({key:e,state:{init(e,t){let{doc:i}=t;return{decorations:this.decorateDoc(i)}},apply(e,t){var n,a;let r=null==(n=i.processEntireDoc)?void 0:n.call(i),s=null!=(a=i.shouldProcessStep)?a:o.Be,l=t.decorations;if(!e.steps.length&&!r)return{...t,decorations:l.map(e.mapping,e.doc)};if(r||(0,o.R3)(e))return{...t,decorations:this.decorateDoc(e.doc)};let c=[];e.steps.forEach((t,i)=>{if(s(t))return this.processStep(t,e,c,i)});let d=this.removeOverlappingDecorations(l.map(e.mapping,e.doc),c).add(e.doc,c);return{...t,decorations:d}}},props:{decorations:t=>{var i;return null==(i=e.getState(t))?void 0:i.decorations}}}),this.decorateNode=t}}var d=i(61386),p=i(49617),u=i(84739);function h(e,t,i,a,r){if((0,p.cE)(a)&&e.push(s.NZ.node(i,i+t.nodeSize,{},{isAnnotatable:!0})),(0,d.CD)(t))e.push(s.NZ.node(i,i+t.nodeSize,{class:(0,n.cx)("block","block-".concat(t.type.name),0===r&&"first-block",r===a.childCount-1&&"last-block")})),0===r&&((0,d.jg)(a)||(0,u.Eg)(a))&&e.push(s.NZ.node(i,i+t.nodeSize,{class:"first-block-in-card"},{isFirstBlockInCard:!0}));else{if(!t.isLeaf&&!t.isBlock)return!1;e.push(s.NZ.node(i,i+t.nodeSize,{class:"node-".concat(t.type.name)}))}return!0}let g=a.YY.create({name:"blockClass",addOptions:()=>({blockClass:"block"}),addProseMirrorPlugins:()=>[new c({key:new r.hs("blockClass"),decorateNode:h,options:{processEntireDoc:()=>!l.of.get("useTransactionBlockPlugin")}})]}),m=e=>!!e.find(e=>e.spec.isFirstBlockInCard)},39402:(e,t,i)=>{"use strict";i.d(t,{QJ:()=>x,Jl:()=>m});var n=i(4765),a=i(37243),r=i(63867),s=i(62040),l=i(22670),o=i(51831),c=i(83817),d=i.n(c),p=i(87489),u=i(20044),h=i(61386);class g{compute(e){let t=(e=>{let t=[],i={tree:{},parents:{},treeArray:[]};return e.doc.descendants((n,a)=>{if(!(0,h.jg)(n))return;let r=e.doc.resolve(a),s=n.attrs.id;t.push(s);let l=(0,u.TK)(r,h.jg).reverse().map(e=>{let{node:t}=e;return t.attrs.id}),o=[...l,s];o.reduce((e,t)=>(e[t]=e[t]||{},e[t]),i.tree),i.parents[s]=l,o.reduce((e,t)=>{let i=e.find(e=>e.id===t);return i?i.children:(e.push({id:s,children:[]}),e)},i.treeArray)}),{cardIds:t,cardIdMap:i}})(e);d()(this.value,t)||(this.hasChanges=!0);let i=t.cardIds.filter(Boolean),n=i.filter((e,t)=>i.includes(e,t+1));return this.duplicateCardIds=n.filter(e=>!this.duplicateCardIds.includes(e)),this.value=t,this}apply(e,t){return e.docChanged&&this.compute(t),this}processChanges(e){this.hasChanges&&this.value&&e((0,p.t0)(this.value)),this.hasChanges=!1}constructor(){this.hasChanges=!1,this.duplicateCardIds=[],this.value=null}}let m=new r.hs("cardIds"),x=a.YY.create({name:"cardIds",priority:o.y.CardIds,addOptions:()=>({enabled:!0}),addProseMirrorPlugins(){return this.options.enabled?[new r.k_({key:m,state:{init:()=>new g,apply:(e,t,i,n)=>t.apply(e,n)},appendTransaction:(e,t,i)=>{var a;let r=m.getState(i);if(!(null==r||null==(a=r.value)?void 0:a.cardIds))return null;if(e.some(e=>e.docChanged)&&r.duplicateCardIds.length&&!this.editor.isThumbnail){let t={duplicateIds:JSON.stringify(r.duplicateCardIds),transactions:JSON.stringify(f(e)),isThumbnail:this.editor.isThumbnail};null===l.zS||void 0===l.zS||l.zS.track(l.ng.DUPLICATE_CARD_IDS,{...t}),n.Cp("[generateCardIdMap] Duplicate cardIds detected. This is unexpected and will cause spotlight issues. Additional metadata:",{extra:t})}return null}})]:[]}}),f=e=>e.map(e=>{let t=e.steps.map(e=>{if(e instanceof s.Ln||e instanceof s.Wg){var t,i,n;let a=(null==(i=e.slice.toJSON())||null==(t=i.content)?void 0:t[0])||{},r={type:a.type,attrs:a.attrs,contentLength:null==(n=a.content)?void 0:n.length};return{name:e.constructor.name,from:e.from,to:e.to,sliceContentSimple:r}}return e instanceof s.q4?{name:e.constructor.name,pos:e.pos,attr:e.attr}:{name:e.constructor.name}}),i=Object.fromEntries(Object.entries(e.meta).map(e=>{let[t,i]=e;if("annotationEvent"===t){var n,a,r,s,l;return[t,{type:i.type,droppedBlockPos:i.droppedBlockPos,dragging:{inBlockLength:null==(a=i.dragging)||null==(n=a.inBlock)?void 0:n.length,inCardLength:null==(s=i.dragging)||null==(r=s.inCard)?void 0:r.length,origNodePos:null==(l=i.dragging)?void 0:l.origNodePos}}]}return"uiEvent"===t?[t,i]:[t,"object"==typeof i?"object":i]}));return{stepsData:t,docChanged:e.docChanged,selection:{from:e.selection.from,to:e.selection.to},selectionSet:e.selectionSet,metaData:i}})},39444:(e,t,i)=>{"use strict";i.d(t,{E:()=>r,p:()=>s});var n=i(55729),a=i(46649);let r=()=>{let[e,t]=(0,n.useState)(a.O),[i,r]=(0,n.useState)(!1);return{onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),t({x:e.clientX,y:e.clientY}),r(!0)},menuProps:{isOpen:i,position:e,onClose:()=>{r(!1),t(a.O)}}}},s=e=>{let[t,i]=(0,n.useState)(!1),[r,s]=(0,n.useState)(a.O);return{onContextMenu:n=>{if(n.stopPropagation(),n.preventDefault(),e.current){let t=e.current.getBoundingClientRect();s({x:t.left,y:t.bottom})}i(!t)},menuProps:{isOpen:t,position:r,onClose:()=>{i(!1),s(a.O)}}}}},39473:()=>{},39508:(e,t,i)=>{"use strict";i.d(t,{n:()=>n});let n=i(35658).Ay.extend({parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration=line-through",consuming:!1},{style:"text-decoration-line=line-through",consuming:!1}],addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}}})},39616:(e,t,i)=>{"use strict";i.d(t,{_:()=>c});var n=i(55729),a=i(22670),r=i(30361),s=i.n(r),l=i(57489),o=i(87489);let c=(e,t)=>{let i=(()=>{let e=(0,l.GV)(o.SJ);return(0,n.useCallback)(()=>s()(e.config.accentBackgrounds),[e])})(),r=(0,a.st)();return(0,n.useCallback)(n=>{"number"==typeof t&&("blank"===n?e.commands.setCardLayout(t,n):e.commands.setCardLayout(t,n,i),null==r||r.track(a.VV.CARD_LAYOUT_UPDATED,{source:"card-styling-menu",layout:n}))},[e,t,i,r])}},39734:(e,t,i)=>{"use strict";i.d(t,{f:()=>f});var n=i(37243),a=i(83902),r=i(12889),s=i(37524),l=i(44604),o=i(6029),c=i(55729),d=i(98997),p=i(44790),u=i(8774),h=i(81592),g=i(73232),m=i(83090);let x=e=>{let{node:t,decorations:i,editor:n}=e,a=(0,h.v)(i),s=(0,m.Ms)(i),l=(0,g.fZ)(i),{horizontalAlign:x,fontSize:f,placeholder:b}=t.attrs,C=(0,g.yp)(x),v="left"===x&&"ltr"===l||"right"===x&&"rtl"===l,[y,w]=(0,c.useState)(!1),k=s&&a&&(!x||v)&&!(0,u.NO)(n)&&!b||y;return(0,o.jsxs)(p.u,{...e,style:{position:"relative"},children:[(0,o.jsx)(r.$p,{dir:l,"data-font-size":f,"data-multiline-placeholder":b,style:{textAlign:C.textAlign}}),k&&(0,o.jsx)(d.B,{...e,dir:l,slashMenuOpen:y,setSlashMenuOpen:w})]})},f=a.A.extend({name:"paragraph",group:"block cardNotesBlock",selectable:!1,addNodeView:()=>(0,r.gu)(x,{update:l.z0}),allowFontSizes:"body",addAttributes:()=>({fontSize:s.mD}),parseHTML:()=>[{tag:"p"}],renderHTML(e){let{HTMLAttributes:t}=e;return["p",(0,n.KV)(t,{class:"paragraph"}),0]},renderHTMLforAI(e){let{HTMLAttributes:t}=e;return["p",t,0]}})},39872:(e,t,i)=>{"use strict";i.d(t,{J:()=>l});var n=i(94289),a=i(63867),r=i(63689),s=i(72368);class l extends a.LN{map(e,t){let{deleted:i,pos:n}=t.mapResult(this.anchor),r=e.resolve(n);return i?(0,s.n)(r)||a.LN.near(r):new l(r,this.side)}content(){return new n.Ji(n.FK.from(this.node),0,0)}eq(e){return e instanceof l&&e.anchor===this.anchor&&e.side===this.side}toJSON(){return{type:"presentation",anchor:this.anchor,side:this.side}}createSelectionNear(){let e=this.side<1?1:-1;return(0,r.s)(this.$from,e)||a.LN.near(this.$from)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for PresentationSelection.fromJSON");return new l(e.resolve(t.anchor))}static create(e,t,i){return new l(e.resolve(t),i)}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}constructor(e,t=0){let i=e.nodeAfter;super(e,e.node(0).resolve(e.pos+i.nodeSize)),this.node=i,this.side=t}}if(l.prototype.visible=!1,!l.prototype.jsonID)try{a.LN.jsonID("presentation",l)}catch(e){}},39977:(e,t,i)=>{"use strict";i.d(t,{TH:()=>u,YC:()=>m,kT:()=>h,nK:()=>g});var n=i(58495),a=i(83691),r=i(51203),s=i(2137),l=i(25135),o=i(63689),c=i(65222),d=i(88273),p=i(80772);let u=(e,t,i,a)=>{var o;let c,u={type:l.h.IMAGE,source:r.mx.key,image:{uploadStatus:s.A.Uploading,source:r.mx.key}};(0,d.aI)(i.type)?(u.image.showPlaceholder=!0,c="HEIC_tempId_".concat((0,n.Ak)())):c=URL.createObjectURL(i),u.image.tempUrl=c;let h=(t,i)=>{if(!c&&!i)return;let n=c||i;(0,p.Ki)(e,n,t)};t.setNodeAttribute(a,"background",u).setMeta("imageUploadUpdateAttrs",!0),(0,r.QM)(i,null==(o=e.storage.mediaUpload)?void 0:o.orgId,{onOriginalFileUpload:h,onUploadComplete:h,onUploadFailed:t=>{(0,p.wt)(e,c,t),URL.revokeObjectURL(c)}})},h=(e,t)=>t.map(t=>{let i=(0,c.QC)(t);return(0,d.u3)(t.type)?m(t,e):(0,c.PQ)(t.type,i)?f(t,e):(0,c.cZ)(t.type,i)?x(t,e):null}).filter(e=>null!==e),g=function(e,t,i){let n=h(e,t);if(0==n.length)return;let a=n.map(e=>e.content),r=e.state.doc.resolve(i),s=r.parent.inlineContent,l=i;s&&0===r.parentOffset?l=i-1:s&&null===r.nodeAfter&&(l=i+1),e.chain().insertContentAt(l,a,{updateSelection:!1}).command(e=>{var t;let{tr:i}=e,n=i.doc.resolve(i.mapping.map(l)),a=(0,o.s)(i.doc.resolve(n.pos-((null==(t=n.nodeBefore)?void 0:t.nodeSize)||1)));return a&&i.setSelection(a),!0}).run(),n.forEach(e=>{e.upload()}),setTimeout(()=>{e.commands.scrollIntoView()},200)},m=(e,t)=>{let i={uploadStatus:s.A.Uploading,source:r.mx.key};(0,d.aI)(e.type)?(i.showPlaceholder=!0,i.tempUrl="HEIC_tempId_".concat((0,n.Ak)())):i.tempUrl=URL.createObjectURL(e);let a=(e,n)=>{let a=i.tempUrl;(a||n)&&(0,p.Ki)(t,a||n,e)},l={onOriginalFileUpload:a,onUploadComplete:a,onUploadFailed:e=>{i.tempUrl&&((0,p.wt)(t,i.tempUrl,e),URL.revokeObjectURL(i.tempUrl))}};return{name:e.name,content:{type:"image",attrs:i},upload:()=>{var i;return(0,r.QM)(e,null==(i=t.storage.mediaUpload)?void 0:i.orgId,l)}}},x=(e,t)=>{let i=URL.createObjectURL(e),n={...(0,p.bY)(e),url:i},a=(e,n)=>{(i||n)&&(0,p.X6)(t,i||n,e)},s={onOriginalFileUpload:a,onUploadComplete:a};return{name:e.name,content:{type:"embed",attrs:n},upload:()=>{var i;return(0,r.QM)(e,null==(i=t.storage.mediaUpload)?void 0:i.orgId,s,"node","doc")}}},f=(e,t)=>{let i=URL.createObjectURL(e),n={...(0,p.bY)(e),url:i},s=(e,n)=>{(i||n)&&(0,p.X6)(t,i||n,e)},l={onOriginalFileUpload:s,onUploadComplete:s};return{name:e.name,content:{type:"embed",attrs:n},upload:()=>{var i;return(0,r.QM)(e,null==(i=t.storage.mediaUpload)?void 0:i.orgId,l,"node","importCsv",a.$.TRANSLOADIT_FILE_TEMPLATE_ID)}}}},40271:(e,t,i)=>{"use strict";i.d(t,{V:()=>p});var n=i(6029),a=i(49611),r=i(55597),s=i(48621),l=i(3616),o=i(62276),c=i(44732),d=i(41671);let p=e=>{let{onClick:t,image:i}=e,{toggleBuddyChatPanel:p,isBuddyChatPanelOpen:u}=(0,o.Cy)();return(0,d.l)(i)?(0,n.jsx)(a.$,{size:"sm",variant:"special",leftIcon:(0,n.jsx)(s.g,{icon:r.p7g}),onClick:()=>{u||p(),t()},children:(0,n.jsx)(l.x6,{id:"0aK6vE",values:{AGENT_PROPER_NOUN:c.qV}})}):null}},40300:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(25135),a=i(84739);let r=(e,t,i,r,s)=>{let l=t.doc.nodeAt(i);if((null==l?void 0:l.type.name)!=="card")return!1;let o=l.attrs,c=(0,a.lH)(r);if((0,a.Fm)(t,i,e.schema,c),r===o.layout)return!0;t.setNodeAttribute(i,"layout",r);let{accent:d}=(0,a.dg)(t,i);if(s&&d&&d.node.attrs.background.type===n.h.NONE){let e=s();e&&t.setNodeAttribute(d.pos,"background",e)}let{layoutTemplateColumns:p}=l.attrs,u=o.layout;return p&&("left"===u&&"right"===r||"right"===u&&"left"===r)&&t.setNodeAttribute(i,"layoutTemplateColumns",p.split(" ").reverse().join(" ")),!0}},40425:(e,t,i)=>{"use strict";i.d(t,{rn:()=>a.HT,J3:()=>l.J,cq:()=>W.cq,gC:()=>W.gC,JD:()=>W.JD,AL:()=>P,Tn:()=>W.Tn,Kl:()=>W.Kl,QN:()=>W.QN,rO:()=>W.rO,CG:()=>W.CG,lD:()=>W.lD,rP:()=>d,D8:()=>W.D8,aH:()=>o.aH,w7:()=>W.w7,aO:()=>W.aO,_t:()=>W._t,i4:()=>W.i4,L0:()=>W.L0,LF:()=>K,_G:()=>W._G,Qg:()=>W.Qg,uC:()=>W.uC});var n=i(63867),a=i(67396),r=i(41959),s=i(91433),l=i(76216),o=i(7434);let c=new n.hs("fix-tables");function d(e,t){let i,n=(t,n)=>{"table"!=t.type.spec.tableRole||(0,r.VM)(t)||(i=function(e,t,i,n){let a,r,d=l.J.get(t);if(!d.problems)return n;n||(n=e.tr);let p=[];for(let e=0;eA
",color:void 0,isEmphasized:!1},rightCircle:{text:"B
",color:void 0,isEmphasized:!1},leftRightIntersection:{text:"A & B",color:void 0,isEmphasized:!1}}),formattingMenu:e=>{let{editor:t,selection:i,decorations:r}=e,{data:l}=i.node.attrs,o=(0,s.useCallback)(e=>{try{let n=e({...l});t.commands.updateAttributesAtPos(i.from,{data:n})}catch(e){console.error("Error updating Venn diagram data",e)}},[l,t.commands,i.from]),c=(0,s.useCallback)(()=>{o(e=>({...e,topCircle:{text:"C
",color:void 0,isEmphasized:!1},topLeftIntersection:{text:"A & C",color:void 0,isEmphasized:!1},topRightIntersection:{text:"B & C",color:void 0,isEmphasized:!1},allIntersection:{text:"A & B & C",color:void 0,isEmphasized:!1}}))},[o]),d=(0,s.useCallback)(()=>{o(e=>({leftCircle:e.leftCircle,rightCircle:e.rightCircle,leftRightIntersection:e.leftRightIntersection,topCircle:void 0,topLeftIntersection:void 0,topRightIntersection:void 0,allIntersection:void 0}))},[o]),p=!!l.topCircle;return(0,n.jsx)(V,{editor:t,selection:i,decorations:r,children:(0,n.jsxs)(k.z,{children:[!p&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.$,{size:"sm",variant:"toolbar",onClick:c,leftIcon:(0,n.jsx)(L.g,{icon:a.q_k}),ms:2,children:(0,n.jsx)(j.x6,{id:"Fgzljt"})}),(0,n.jsx)(S.q,{})]}),p&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.$,{size:"sm",variant:"toolbar",onClick:d,leftIcon:(0,n.jsx)(L.g,{icon:a.mGv}),ms:2,children:(0,n.jsx)(j.x6,{id:"DUcdY9"})}),(0,n.jsx)(S.q,{})]})]})})}},funnel:nK,[iI]:i_,[td]:tp,[iE]:iS,[tz]:tH,[tV]:tO,[iA]:iL,[i$]:iY,[i6]:i9,[tN]:tP,[iQ]:iq,[iy]:iw,[ts]:tl,[it]:ii,[ip]:iu,[tn]:ta,[ib]:iC,[tD]:tR,[iO]:iZ,[tS]:tM,[iU]:iW,[iP]:iF,[i3]:i5},n3={[nf]:nb,[np]:nu,[ng]:nm,[nv]:ny,[nV]:nO,[nz]:nH,[nD]:nR,[nM]:nI,[nj]:nE,[i8]:ne,[ni]:nn,[nr]:ns,[nk]:nA,[no]:nc,[nN]:nP},n5={bullseye_composable:td,quadrant:iA,"square-arrows":iQ,bubbles:ts},n4=e=>(n5[e]&&(e=n5[e]),n3[e])?n3[e]:n2[e],n6=e=>{let t=n4(e);return null==t?void 0:t.formattingMenu}},41198:(e,t,i)=>{"use strict";i.d(t,{DZ:()=>f,Bq:()=>x});var n=i(82318),a=i(12889),r=i(56250),s=i(44604),l=i(6029),o=i(21938),c=i(77650),d=i(28547),p=i(44790),u=i(39239),h=i(73232);let g=e=>{let{node:t,decorations:i}=e,{level:n,horizontalAlign:r,placeholder:s}=t.attrs,g=(0,u.h)(i),m=s||(g?c.Ru._({id:"gLDJuJ"}):c.Ru._({id:"1nLERW",values:{level:n}}));return(0,l.jsx)(p.u,{...e,style:{display:"flex",flexDirection:"column",...(0,h.yp)(r)},children:(0,l.jsx)(a.$p,{dir:(0,h.fZ)(i),level:n,"data-placeholder":m,className:(0,o.cx)("heading",d.U6),style:{minWidth:"min(100%, 10em)",...(0,h.O8)(r)}})})},m=[1,2,3,4],x=Math.max(...m),f=n.D.extend({selectable:!1,group:"block cardNotesBlock",addAttributes:()=>({level:{default:1,rendered:!1}}),addNodeView:()=>(0,a.gu)(g,{update:s.z0}),addInputRules(){return this.options.levels.map(e=>(0,r.tC)({find:new RegExp("^(#{1,".concat(e,"})\\s$")),type:this.type,getAttributes:{level:e}},[this.editor.state.schema.nodes.bullet,this.editor.state.schema.nodes.numbered,this.editor.state.schema.nodes.todo]))}}).configure({levels:m})},41285:(e,t,i)=>{"use strict";i.d(t,{o:()=>r});var n=i(29165);let a={base:"md","2xl":"lg"},r=()=>(0,n.h5)(a)},41327:(e,t,i)=>{"use strict";i.d(t,{Bo:()=>w,Gx:()=>y,R6:()=>C,Yq:()=>v});var n=i(77650),a=i(39093),r=i(94657),s=i(35561),l=i(23995),o=i(71995),c=i(115),d=i(23148),p=i(69100),u=i(7928),h=i(65576),g=i(92113),m=i(33547),x=i(98639),f=i(72441);let b={ar:o.A,en:c.A,fa:d.A,"pt-br":p.A,ja:u.A,"zh-cn":h.A,"zh-tw":g.A,es:m.A,fr:x.A,ko:f.A},C=()=>b[n.Ru.locale]||void 0,v=(e,t)=>e?(0,a.A)((0,r.A)(e),t,{locale:C()}):"",y=(e,t)=>e?(0,s.A)((0,r.A)(e),t?(0,r.A)(t):new Date,{locale:C()}):"",w=e=>e?(0,l.A)((0,r.A)(e),{locale:C()}):""},41531:(e,t,i)=>{"use strict";i.d(t,{mi:()=>n.m}),i(6029),i(81278),i(55729),i(5302),i(78292),i(57489),i(48086),i(90700),i(30078),i(1319),i(83495),i(77970),i(83948),i(42116),i(10961),i(43987),i(82779),i(9251);var n=i(47071);i(2420),i(60762),i(90326),i(73275)},41563:(e,t,i)=>{"use strict";i.d(t,{g:()=>x,j:()=>m});var n=i(6029),a=i(40452),r=i(26420),s=i(99492),l=i(55597),o=i(48621),c=i(3616),d=i(58781),p=i(45588),u=i(99173),h=i(51288),g=i(56108);let m=e=>{let{onClick:t=()=>{},...i}=e;return(0,p.u)("disableRemoveBackground")?null:(0,n.jsx)(g.I,{label:(0,n.jsxs)(a.s,{alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(c.x6,{id:"ylbfBl"}),(0,n.jsx)(d.G,{type:"removeBackground",ms:2,color:"gray.400"})]}),onClick:t,...i,children:(0,n.jsxs)(r.a,{as:"span",className:"fa-layers fa-fw",children:[(0,n.jsx)(o.g,{icon:s.sAw,size:"lg"}),(0,n.jsx)(o.g,{icon:l.X46,size:"xs",transform:"shrink-5"})]})})},x=e=>{let{editor:t,decorations:i}=e,a=(0,u.Bn)(i),{startRemoveBg:r,isRemoveBgLoading:s}=(0,h.D)({editor:t,id:null==a?void 0:a.cardId});return(0,n.jsx)(m,{onClick:r,disabled:s})}},41582:(e,t,i)=>{"use strict";i.d(t,{KD:()=>s,P6:()=>l,Rj:()=>c,S4:()=>d,TF:()=>o,ve:()=>r});var n=i(36939),a=i(86524);let r=e=>{var t,i,n,a,r,s,l;return("image.ai-generated"===e.source?null==(t=e.aiParams)?void 0:t.prompt:e.query)||(null==(i=e.meta)?void 0:i.description)||(null==(n=e.meta)?void 0:n.alt_description)||(null==(a=e.meta)?void 0:a.title)||(null==(r=e.meta)?void 0:r.snippet)||(null==(l=e.meta)||null==(s=l.tags)?void 0:s.join(", "))},s=e=>e.height>e.width?"portrait":e.height{let a={};if(e){if(n&&"cascade"===e.horizontal){let e=t%i+1;a.paddingTop="".concat((i-e)*1.5,"em"),a.paddingBottom=0}else n||"oscillating"!==e.vertical||(a.paddingInlineStart="".concat(function(e){let t=e%6;return t<=3?1.5*t:4.5-(t-3)*1.5}(t),"em"));n&&"function"==typeof e.horizontal?a.paddingTop=e.horizontal(t,i):n||"function"!=typeof e.vertical||(a.paddingInlineStart=e.vertical(t))}return a})(K,R,ee,X):void 0,en=null!=(i=_.gridDirection)?i:"horizontal",ea={gridColumn:et.columnStart?"".concat(et.columnStart," / span ").concat(et.columnSpan):"horizontal"===en?"span var(--grid-".concat(G,"-item-").concat(R,"-resize-flow, ").concat(et.columnSpan,")"):"vertical"===en?"span var(--grid-".concat(G,"-item-").concat(R,"-resize-cross, ").concat(et.columnSpan,")"):"span ".concat(et.columnSpan),...ei};et.rowStart?ea.gridRow=et.rowSpan?"".concat(et.rowStart," / span ").concat(et.rowSpan):"".concat(et.rowStart):et.rowSpan&&(ea.gridRow="vertical"===en?"span var(--grid-".concat(G,"-item-").concat(R,"-resize-flow, ").concat(et.rowSpan,")"):"horizontal"===en?"span var(--grid-".concat(G,"-item-").concat(R,"-resize-cross, ").concat(et.rowSpan,")"):"span ".concat(et.rowSpan));let er=null==(t=h.q[C])?void 0:t.component;("none"===C||"solid"===C||"outline"===C)&&(s=(0,n.jsxs)(x.k,{cellContentPropOverrides:v,colorVars:Q,alignStyles:Y,cellStyle:C,cellProps:g,theme:N,cursor:T.cursor||"text",onClick:T.onClick,cellDecorConfig:k,markerConfig:y,innerLabelConfig:w,onDragOver:E,onDragLeave:S,onDrop:M,className:I,children:[f,L,j]})),P&&(s=(0,n.jsx)(m,{className:I,children:f})),er&&(s=(0,n.jsxs)(er,{colorVars:Q,alignStyles:Y,cellProps:g,onDragOver:E,onDragLeave:S,onDrop:M,className:I,children:[f,L,j]}));let es=[...((e,t,i)=>{let n=["grid-item"];return"vertical"===e?n.push("grid-item-vertical"):n.push("grid-item-horizontal"),"none"===t&&n.push("grid-item-cell-style-none"),i&&n.push("grid-item-full-bleed"),n})(en,C,P),...I?[I]:[]];return(0,n.jsx)(a.s,{"data-content-reference":!0,sx:{...ea},h:"100%",position:"relative",className:(0,r.cx)(...es),"data-selection-ring":!0,children:s})});f.displayName="GridItem"},46004:(e,t,i)=>{"use strict";i.d(t,{K:()=>s});var n=i(83691),a=i(1319),r=i(57489);let s=()=>{var e,t;let i=(0,r.GV)(a.Jo);if(!i)return!1;let s=n.$.SHARE_TOKEN,l=null==(e=i.accessLinks)?void 0:e.some(e=>""===e.token),o=null==(t=i.accessLinks)?void 0:t.some(e=>null===e.permission);return!!s||!!l&&!o}},46649:(e,t,i)=>{"use strict";i.d(t,{O:()=>n});let n={x:-1e3,y:-1e3}},46672:(e,t,i)=>{"use strict";i.d(t,{c:()=>r,e:()=>a});var n=i(55729);let a=(0,n.createContext)({onDragStart:void 0}),r=()=>(0,n.useContext)(a)},47748:(e,t,i)=>{"use strict";i.d(t,{x:()=>m,q:()=>x});var n=i(73232),a=i(57257),r=i(79324),s=i(6029),l=i(99492),o=i(3616),c=i(77650),d=i(56108);let p={key:"hasLine",defaultValue:()=>!0,Control:e=>{let{value:t,updateValue:i,option:n}=e;return(0,s.jsx)(d.I,{label:n.name(),onClick:()=>i(!t),isActive:t,icon:l.CCK})},ControlMenu:(e,t,i)=>({key:i.key,label:e?(0,s.jsx)(o.x6,{id:"IELtbA"}):(0,s.jsx)(o.x6,{id:"81xMlD"}),icon:l.CCK,onClick:()=>t(!e)}),name:()=>c.Ru._({id:"aPb1AT"})};var u=i(77258);let h={key:"twoSided",defaultValue:()=>!0,Control:e=>{let{value:t,updateValue:i,option:n}=e;return(0,s.jsx)(d.I,{label:n.name(),onClick:()=>i(!t),isActive:t,icon:l.v6v,testId:"smart-layout-two-sided-option"})},ControlMenu:(e,t,i)=>({key:i.key,label:e?c.Ru._({id:"x+f1ZW"}):c.Ru._({id:"o18EC+"}),icon:l.v6v,onClick:()=>t(!e)}),name:()=>c.Ru._({id:"ovs7iP"})};var g=i(69144);let m=e=>{let{additionalOptions:t=[],additionalCellOptions:i=[],presetConfigurations:s=[],...l}=e;return{baseHorizontalAlign:(0,n.Ro)("center"),imageSlot:"optional",imageType:"icon",options:(0,g.l)([{...u.i,defaultValue:()=>"vertical"},h,p,a.h],t),cellOptions:(0,g.l)([a.h,r.Y],i),presetConfigurations:s.length>0?s:[{name:()=>"Horizontal (one-sided)",options:{twoSided:!1,hasLine:!0,orientation:"horizontal"}},{name:()=>"Horizontal (two-sided)",options:{twoSided:!0,hasLine:!0,orientation:"horizontal"}},{name:()=>"Vertical (one-sided)",options:{twoSided:!1,hasLine:!0,orientation:"vertical"}},{name:()=>"Vertical (two-sided)",options:{twoSided:!0,hasLine:!0,orientation:"vertical"}}],addDirection:e=>"horizontal"===e.orientation?"right":"bottom",isFullWidth:e=>"horizontal"===e.orientation,...l}},x=e=>{let{additionalOptions:t=[],presetConfigurations:i=[],...n}=e;return m({...n,additionalOptions:[{...h,defaultValue:()=>!0},...t],presetConfigurations:i.length>0?i:[{name:()=>"Horizontal",options:{twoSided:!0,hasLine:!0,orientation:"horizontal"}},{name:()=>"Vertical",options:{twoSided:!0,hasLine:!0,orientation:"vertical"}}],defaultOptions:{twoSided:!0,numbered:!1,...n.defaultOptions}})}},47830:(e,t,i)=>{"use strict";i.d(t,{G:()=>s,_:()=>r});var n=i(25183),a=i(8489);let r=(e,t)=>{var i;let n=(0,a.o)(t);return(e&&null!=(i=n.mobileSize)?i:n.size)+.75},s=(e,t,i,s)=>{var l,o,c;let d=(0,a.o)(s),p="body"===d.type,u=t&&null!=(l=d.mobileSize)?l:d.size,h=null===i?0:r(t,i);return(h-u*(p||t?null!=(o=e.config.lineHeightBody)?o:n.Uw:null!=(c=e.config.lineHeightHeading)?c:n.eL))/2}},48306:(e,t,i)=>{"use strict";i.d(t,{n:()=>r});var n=i(3616),a=i(55729);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=(0,n.uB)();return(0,a.useMemo)(e,[i,e,...t])}},48420:(e,t,i)=>{"use strict";i.d(t,{N:()=>d});var n=i(6029),a=i(17399),r=i(12889),s=i(44790),l=i(51831),o=i(44604);let c=e=>(0,n.jsx)(s.u,{...e,children:(0,n.jsx)("pre",{children:(0,n.jsx)(r.$p,{as:"code"})})}),d=a.Ay.extend({selectable:!1,isolating:!0,addOptions(){var e;return{...null==(e=this.parent)?void 0:e.call(this),exitOnTripleEnter:!1}},addNodeView:()=>(0,r.gu)(c,{update:o.z0}),priority:l.y.CodeBlock})},48508:(e,t,i)=>{"use strict";i.d(t,{A:()=>h,v:()=>g});var n=i(9922),a=i.n(n),r=i(63867),s=i(94619),l=i(79733),o=i(6319),c=i(25135),d=i(60856),p=i(46030),u=i(49404);let h=e=>{var t,i,n,d;let{editor:h,selection:g,freshNode:x}=e;if(!g||!(g instanceof r.nh||g instanceof s.n))return null;let f=null!=x?x:g.node;if(g.$from,(0,u.bi)(f.type))return{mediaType:m(f.attrs.source),area:"node",attrs:a()(f.attrs),node:f,id:f.attrs.id};if("cardAccentLayoutItem"===f.type.name){let e=f.attrs;return(null==(t=e.background)?void 0:t.type)===c.h.IMAGE&&e.background.image?{mediaType:"image",area:"background",attrs:a()(e.background.image),node:f,id:f.attrs.id,imgKeyPath:"background.image"}:null}if((0,p.dv)(f))return{mediaType:"image",area:"node",attrs:a()(f.attrs.image),node:f,id:f.attrs.id,imgKeyPath:"image"};if("gridItem"===f.type.name){let e=null==(n=f.attrs.options)||null==(i=n.marker)?void 0:i.iconData;return e?{mediaType:"icon",area:"accessory",attrs:a()(e),node:f,id:f.attrs.id,imgKeyPath:"options.marker.iconData"}:null}let b=f.type.spec.accessoryImageKey;if(b){let e={...f.attrs[b]},t="image";return(0,l.M)(g.$from.parent)&&"icon"===(0,o.BJ)(g.$from.parent.attrs.variantKey).imageType&&(t="icon"),{attrs:a()(e),node:f,mediaType:t,id:f.attrs.id,area:"accessory",imgKeyPath:b}}if(g instanceof s.n){let e="icon";return"image"===g.context.selectionType?e="image":"icon"===g.context.selectionType&&(e="icon"),{attrs:a()(null!=(d=g.getItemData())?d:{}),node:f,mediaType:e,id:f.attrs.id,area:"accessory",imgKeyPath:g.keyPath}}return null},g=e=>{let{editor:t,pos:i,attrs:n}=e;if(!t)return;let a=t.state.doc.nodeAt(i);if(!a)return;let r=a.type.spec.imageKeyPath;if(!["image","mediaPlaceholder"].includes(a.type.name)&&!r)return void console.warn("[updateSelectedMedia] Node ".concat(a.type.name," is not compatible with updateSelectedMedia"));let s=t.chain();r?(s.updateAttributeKeyPathAtPos(i,r,n),r.startsWith("background.")&&(s.updateAttributeKeyPathAtPos(i,"background.source",n.source),s.updateAttributeKeyPathAtPos(i,"background.type",c.h.IMAGE))):"mediaPlaceholder"===a.type.name?s.insertContentAt({from:i,to:i+a.nodeSize},{type:"image",attrs:n},{updateSelection:!0}):s.updateAttributesAtPos(i,n),s.focus().scrollIntoView().run()},m=e=>e?(0,d.D)(e)?"icon":e.startsWith("image.")?"image":e.startsWith("video.")||e.startsWith("embed.")?"embed":"image":"image"},48578:(e,t,i)=>{"use strict";i.d(t,{EF:()=>a.E,pO:()=>a.p,tz:()=>n.t});var n=i(45379),a=i(39444)},48974:(e,t,i)=>{"use strict";i.d(t,{M:()=>k});var n=i(6029),a=i(68917),r=i(78140),s=i(36999),l=i(49611),o=i(41283),c=i(37930),d=i(48478),p=i(58959),u=i(26420),h=i(77650),g=i(55729),m=i(33612),x=i.n(m),f=i(12259),b=i(35859),C=i(45588),v=i(57489),y=i(26533),w=i(87489);let k=e=>{let{accentColor:t,selected:i,onChange:u,steps:m=5,menuButton:k}=e,L=(0,v.GV)(w.SJ),j=(0,y.CD)(L),E=Array(m).fill(0).map((e,t)=>t),S=(0,C.u)("useNewChartingColorSet"),M=(0,b.SM)(S),I=(0,g.useMemo)(()=>(0,f.bW)({chartColorSchemes:M,useNewChartingColorSet:S,themeAccentColors:j,steps:m,theme:L,accentColor:t}),[t,j,L,S,M,m]);i&&!I[i]&&(i=void 0);let _=h.Ru._({id:"ovBPCi"});return(0,n.jsxs)(r.W,{isLazy:!0,children:[k||(0,n.jsx)(s.I,{as:l.$,variant:"plain",size:"sm",w:40,boxShadow:"none",textAlign:"start",rightIcon:(0,n.jsx)(a.D,{}),sx:{"span:first-of-type":{overflow:"clip",textOverflow:"ellipsis"}},children:i?I[i].label():_}),(0,n.jsx)(o.c,{zIndex:"modalPopover",maxH:"200px",overflowY:"auto",children:(0,n.jsx)(c.i,{value:i||"default",type:"radio",onChange:e=>{u("default"===e?void 0:e)},children:Object.entries({default:{...I[b.gb],label:()=>_},...I}).sort((e,t)=>{let[i]=e,[n]=t,a=e=>"default"===e?0:"theme"===e?1:"monochrome"===e?2:e.startsWith("monochrome-")?2+parseInt(e.split("-")[1],10)/100:"alternating"===e?3:"spin"===e?4:"complement"===e?5:"complement2"===e?6:999;return a(i)-a(n)}).map(e=>{let[a,{label:r,scale:s}]=e;return 1.5>[...s.values()].map(e=>x().readability(e,t)).reduce((e,t)=>Math.max(e,t),0)&&a!==i?null:(0,n.jsx)(d.k,{value:a,children:(0,n.jsx)(p.z,{children:(0,n.jsx)(A,{scale:s,data:E})})},a)})})})]})},A=e=>{let{scale:t,data:i}=e;return(0,n.jsx)(p.z,{spacing:0,borderRadius:"md",overflow:"hidden",children:i.map(e=>{var i;return(0,n.jsx)(u.a,{bg:null!=(i=t.get(e))?i:"black",width:9,height:5},e)})})}},49209:(e,t,i)=>{"use strict";i.d(t,{UU:()=>S,bX:()=>M});var n=i(6029),a=i(55729),r=i(67909),s=i(36071),l=i(68728),o=i(3674),c=i(40691),d=i(26385),p=i(26420),u=i(23293),h=i(48810),g=i(49611),m=i(58959),x=i(16426),f=i(31241),b=i(3616),C=i(44732),v=i(57489),y=i(22670),w=i(6139),k=i(87489),A=i(13051);let L=e=>{let{link:t,confirmFunction:i,onClose:L}=e,j=(0,v.GV)(k.sX),E=(0,y.st)(),S=(0,a.useRef)(!1),M=(0,w.oR)()?"gamma.site":"gamma.app";return(0,a.useEffect)(()=>{S.current||(S.current=!0,null==E||E.track(y.VV.ABUSE_LINK_INTERCEPT_SHOWN,{docId:j,link:t}))},[E,j,t]),(0,n.jsxs)(r.aF,{isOpen:!0,trapFocus:!1,onClose:()=>L("cancel"),children:[(0,n.jsx)(s.m,{}),(0,n.jsxs)(l.$,{children:[(0,n.jsx)(o.s,{}),(0,n.jsx)(c.c,{alignItems:"center",textAlign:"center",children:(0,n.jsxs)(d.B,{mt:8,spacing:4,children:[(0,n.jsx)(p.a,{mx:"auto",children:(0,n.jsx)(f.uh,{w:"16"})}),(0,n.jsx)(u.D,{size:"lg",children:(0,n.jsx)(b.x6,{id:"7kvRf4",values:{GAMMA_PROPER_NOUN:C.On}})}),(0,n.jsx)(h.E,{children:(0,n.jsx)(b.x6,{id:"wkyxjZ",values:{gammaProperty:M},components:{0:(0,n.jsx)("code",{})}})}),(0,n.jsx)(h.E,{fontSize:"sm",py:1,borderRadius:"sm",color:"gray.600",fontFamily:"mono",bg:"blackAlpha.100",children:t}),(0,n.jsx)(d.B,{spacing:2,mt:2,children:(0,n.jsx)(g.$,{variant:"plain",onClick:()=>{i(t),null==E||E.track(y.VV.ABUSE_LINK_INTERCEPT_CONTINUE,{docId:j,link:t}),L("continue")},children:(0,n.jsx)(b.x6,{id:"xGVfLh"})})}),(0,n.jsx)(g.$,{onClick:()=>{null==E||E.track(y.VV.ABUSE_LINK_INTERCEPT_CANCEL,{docId:j,link:t}),L("cancel")},variant:"solid",children:(0,n.jsx)(b.x6,{id:"zx59ra"})}),(0,n.jsx)(m.z,{pt:2,flex:1,children:(0,n.jsx)(A._,{docId:j,buttonType:"button",onSubmitReport:()=>L("report")})})]})}),(0,n.jsx)(x.j,{})]})]})},j=(0,a.createContext)({}),E=e=>{window.open(e,"_blank","noopener")},S=e=>{let{children:t}=e,[i,r]=(0,a.useState)(!1),[s,l]=(0,a.useState)(""),[o,c]=(0,a.useState)(()=>E),d=(0,a.useCallback)((e,t)=>{l(e),t&&c(()=>()=>t(e)),r(!0)},[]),p=(0,a.useCallback)(()=>{l(""),c(()=>E),r(!1)},[]),[u,h]=(0,a.useState)({showLinkInterstitial:d,hideLinkInterstitial:p});return(0,n.jsxs)(j.Provider,{value:u,children:[i&&(0,n.jsx)(L,{link:s,confirmFunction:o,onClose:p}),t]})},M=()=>(0,a.useContext)(j)},49404:(e,t,i)=>{"use strict";i.d(t,{Bv:()=>o,Ez:()=>C,JY:()=>h,KR:()=>x,Kk:()=>b,Xs:()=>f,Zj:()=>u,_Y:()=>d,bi:()=>c,di:()=>w,eb:()=>g,fu:()=>v,gk:()=>m,lQ:()=>p,oS:()=>y});var n=i(21572),a=i(10197),r=i(2211),s=i(88273);let l=["image","video","embed","mediaPlaceholder"],o=e=>c(e.type),c=e=>l.includes(e.name),d=e=>"video"===e.type.name||"embed"===e.type.name,p=e=>e.href||e.url||e.sourceUrl||e.embedUrl||void 0,u=e=>{var t;return(null==(t=e.embed)?void 0:t.url)?e.embed.url:"embedUrl"in e&&e.embedUrl?e.embedUrl:p(e)},h=e=>{var t,i;let n=e.attrs;return[null==(t=n.meta)?void 0:t.title,null==(i=n.meta)?void 0:i.site].filter(Boolean).join(" - ")},g=(e,t)=>{var i;return null!=(i=e.clickBehavior)?i:t?"newTab":"expand"},m=e=>null!=e?e:"expand",x=e=>(null==e?void 0:e.source)===r.u.key,f=e=>(0,s.SV)((null==e?void 0:e.src)||(null==e?void 0:e.tempUrl))&&(e=>(e=>(null==e?void 0:e.source)===a.f.key)(e)||x(e))(e),b=(e,t)=>{if(!e)return e;try{let i=new URL(e);return i.searchParams.set("ctx",t||"inline-svg"),i.toString()}catch(t){return console.error("[getSrcUrlForInlineSvg] Error with src url for inline SVG",t),e}},C=e=>{let{width:t,height:i,resize:a}=e.meta||{},r=(0,n.calculateResizeToFitViewport)({width:t,height:i,viewportHeight:window.innerHeight,currentResize:a});return r?{...e,resize:r}:e},v="unfetched",y="complete",w=e=>{switch(e){case v:case y:return e;default:return y}}},49477:(e,t,i)=>{"use strict";i.d(t,{v:()=>g});var n=i(6029),a=i(36999),r=i(49611),s=i(26385),l=i(26420),o=i(48810),c=i(99492),d=i(48621),p=i(3616),u=i(33612),h=i.n(u);let g=e=>{let{color:t,isDefaultColor:i,isMixed:u=!1,...g}=e;return(0,n.jsx)(a.I,{as:r.$,variant:"plain",size:"sm",boxShadow:"none",minW:"fit-content",textAlign:"left",rightIcon:(0,n.jsx)(d.g,{fixedWidth:!0,icon:c.Jt$,transform:"shrink-6"}),...g,children:(0,n.jsxs)(s.B,{direction:"row",spacing:2,align:"center",children:[(0,n.jsx)(l.a,{as:"span",alignSelf:"center",boxSize:5,borderRadius:"md",border:"2px solid",borderColor:"gray.300",bgColor:t}),(0,n.jsx)(o.E,{fontFamily:i||u?void 0:"mono",textTransform:i||u?void 0:"uppercase",fontSize:"sm",children:u?(0,n.jsx)(p.x6,{id:"+UN6+J"}):i?(0,n.jsx)(p.x6,{id:"ovBPCi"}):h()(t).toHexString()})]})})}},49617:(e,t,i)=>{"use strict";i.d(t,{Q4:()=>h,Ti:()=>d,U5:()=>g,Vo:()=>u,cE:()=>c,ek:()=>f,es:()=>m,nh:()=>x,rV:()=>p});var n=i(60122),a=i(2009),r=i(37243),s=i(46030),l=i(75572),o=i(54040);let c=e=>(0,s.jg)(e)||(0,s.sw)(e)||(0,l.p8)(e),d=(e,t)=>!(0,s.jg)(e)&&!(0,s.sw)(e)&&c(t),p=e=>{if(c(e.parent))return{pos:e.pos,node:e.nodeAfter};for(let t=e.depth;t>0;t--){let i=e.node(t);if(c(e.node(t-1)))return{pos:t>0?e.before(t):0,node:i}}return null},u=e=>{let{pos:t,from:i,to:n,editor:a}=e,{state:l}=a,c=o.q.getState(l);if(!c)return null;let d=(0,r.eL)(a.state.doc.resolve(t),s.jg),p=c.getAnnotationsBetween(l,i,n),u=d?c.getAnnotationsBetween(l,d.pos,d.pos+d.node.nodeSize).filter(e=>!p.find(t=>t.id===e.id)):[];return{inBlock:p,inCard:u,origNodePos:t}},h=e=>{let{dropPos:t,dropNode:i,dragging:r,side:s,tr:l,view:c}=e,d=o.q.getState(c.state);if(!d)return[];let p=d.getAnnotationsBetween(c.state,t,t+i.nodeSize),u=r.inBlock,h="left"===s?r.origNodePos:t,g="left"===s?t:r.origNodePos,{doc:m,type:x,binding:f}=n.pJ.getState(c.state),b=l.mapping.map(t),C=(e,t)=>i=>{let{id:n,relativePos:r}=i,s=(0,a.bL)(m,x,r,f.mapping);return null==s?null:{id:n,newPos:b+(s-e)+t}},v=[...("left"===s?u:p).map(C(h,1)).filter(e=>!!e),...("left"===s?p:u).map(C(g,2)).filter(e=>!!e)],y=r.inCard.filter(e=>{let{id:t}=e;return!v.find(e=>e.id===t)}).map(e=>{let{id:t,pos:i}=e,n=l.mapping.map(i);return i===n?null:{newPos:n,id:t}}).filter(e=>!!e);return[...v,...y]},g=e=>{let{dropPos:t,dropNode:i,dragging:r,side:s,tr:l,view:c,leftContentSize:d}=e,p=o.q.getState(c.state);if(!p)return[];let u=p.getAnnotationsBetween(c.state,t,t+i.nodeSize),h=r.inBlock,g="left"===s?r.origNodePos:t,m="left"===s?t:r.origNodePos,{doc:x,type:f,binding:b}=n.pJ.getState(c.state),C=l.mapping.map(t),v=(e,t)=>i=>{let{id:n,relativePos:r}=i,s=(0,a.bL)(x,f,r,b.mapping);return null==s?null:{id:n,newPos:C+(s-e)+t}},y=[...("left"===s?h:u).map(v(g,2)).filter(e=>!!e),...("left"===s?u:h).map(v(m,4+d)).filter(e=>!!e)],w=r.inCard.filter(e=>{let{id:t}=e;return!y.find(e=>e.id===t)}).map(e=>{let{id:t,pos:i}=e,n=l.mapping.map(i);return i===n?null:{newPos:n,id:t}}).filter(e=>!!e);return[...y,...w]},m=e=>{let{contentPos:t,contentEnd:i,insertPos:r,editor:s}=e,l=o.q.getState(s.state);if(!l)return[];let{state:c}=s,d=l.getAnnotationsBetween(c,t,i),{doc:p,type:u,binding:h}=n.pJ.getState(s.view.state);return d.map(e=>{let{id:i,relativePos:n}=e,s=(0,a.bL)(p,u,n,h.mapping);return null==s?null:{id:i,newPos:r+(s-t)}}).filter(e=>!!e)},x=e=>{let t,{dropPos:i,dragging:r,cardWrapOffset:s,tr:l,view:c}=e;if(!o.q.getState(c.state))return[];let{doc:d,type:p,binding:u}=n.pJ.getState(c.state),h=l.mapping.map(i,-1),g=r.inBlock.map((t=r.origNodePos,e=>{let{id:i,relativePos:n}=e,r=(0,a.bL)(d,p,n,u.mapping);return null==r?null:{id:i,newPos:h+(r-t)+s}})).filter(e=>!!e),m=r.inCard.filter(e=>{let{id:t}=e;return!g.find(e=>e.id===t)}).map(e=>{let{id:t,pos:i}=e,n=l.mapping.map(i);return i===n?null:{newPos:n,id:t}}).filter(e=>!!e);return[...g,...m]},f=e=>{let{pos:t,tr:i,editor:n}=e,a=o.q.getState(n.view.state);if(!a)return[];let r=n.state.doc.resolve(t);return r.nodeAfter?a.getAnnotationsBetween(n.state,t,t+r.nodeAfter.nodeSize).map(e=>{let{id:n,pos:a}=e;return{id:n,newPos:a===t?i.mapping.map(a+1)-1:i.mapping.map(a)}}):[]}},49646:(e,t,i)=>{"use strict";i.d(t,{N:()=>G});var n=i(37243),a=i(55153),r=i(94289),s=i(63867),l=i(57489),o=i(65632),c=i(56790),d=i(87489),p=i(20044),u=i(1620),h=i(4742),g=i(10961),m=i(35481),x=i(80371),f=i(51831),b=i(45513),C=i(49404),v=i(84),y=i(7063);let w=new s.hs("linkKeyboardNav");function k(e,t,i){if(t<0||t>e.doc.content.size)return!1;let n=e.doc.resolve(t);return!!i.isInSet(n.marks())}var A=i(6029),L=i(26420),j=i(48810),E=i(12514),S=i(36062),M=i(3616),I=i(77850),_=i(4014),D=i(55729),R=i(83691),T=i(60258),z=i(36465),H=i(6139),B=i(12889),N=i(3898),P=i(70077),F=i(66815);let V=(0,I.P)(L.a),O=e=>{let{node:t,children:i}=e,{href:n,meta:a}=t.attrs,r=(0,H.oR)(),{linkUrl:s,handleClick:l}=(0,z.c)({url:n||""}),{interceptLinkClick:o,linkUrlSafe:c,isUntrusted:d,linkInterceptEnabled:p}=(0,T.i)(s),u=(0,D.useCallback)(e=>{if(null==l||l(e),p)return o(e)},[l,o,p]),{popperRef:h,referenceRef:g,isHovering:m,onMouseOver:x,onMouseOut:f,getPopperProps:b}=(0,P.bf)({disabled:(0,N.mG)()}),C=!r&&!R.$.GAMMA_CYPRESS_TEST&&(0,N.H8)();return(0,A.jsxs)(B.VR,{as:"span",children:[d?(0,A.jsx)(j.E,{as:"span",textDecoration:"underline",color:"gray.500",children:(0,A.jsx)(M.x6,{id:"b7jHrl"})}):(0,A.jsxs)(j.E,{as:"a",className:"link",rel:"noopener nofollow",href:p?c||"":s,onClick:u,onMouseOver:x,onMouseOut:f,ref:g,children:[C&&(0,A.jsx)("span",{contentEditable:!1,children:""}),r?i:(0,A.jsx)(B.$p,{as:"span"}),C&&(0,A.jsx)("span",{contentEditable:!1,children:""})]}),!1===r&&m&&s&&a?(0,A.jsx)(E.Z,{children:(0,A.jsx)(_.N,{children:(0,A.jsx)(V,{position:"relative",zIndex:"popover",ref:h,onMouseOver:x,onMouseOut:f,className:"link-preview-hover",...b(),...P._w,w:"min(500px, 80vw)",minW:"auto !important",children:(0,A.jsxs)(S.Q,{backgroundColor:"white",border:"1px solid",borderColor:"gray.200",shadow:"lg",borderRadius:"lg",_hover:{backgroundColor:"trueblue.50"},children:[(0,A.jsx)(F.Ch,{node:t}),(0,A.jsx)(S.r,{href:s,target:"_blank",rel:"noopener nofollow",onClick:u})]})})})}):null]})};var Z=i(93028);let G=a.Ay.extend({priority:f.y.Link,inclusive:!1,excludes:"underline footnoteLabel link",addAttributes:()=>({href:{default:""},source:{},thumbnail:{...(0,p.tb)("thumbnail")},embed:{...(0,p.tb)("embed")},meta:{...(0,p.tb)("meta")}}),onCreate(){let e=(0,l.KA)().getState(),t=(0,d.nD)(e),i=(0,u.mB)(e);if(!(t&&i))return;let{view:n,state:a}=this.editor,{doc:r,schema:s,tr:o}=a;try{let e=!1;(0,c.Zo)(r,s.marks.link).forEach(t=>{let{node:i,pos:n}=t,a=i.marks.find(e=>"link"===e.type.name);a&&"string"!=typeof a.attrs.href&&(e=!0,o.removeMark(n,n+i.nodeSize,a).addMark(n,n+i.nodeSize,s.marks.link.create({...a.attrs,href:String(a.attrs.href)})))}),e&&n.dispatch(o)}catch(e){console.error("[Link.onCreate] error",e)}},renderHTML(e){var t;let{HTMLAttributes:i}=e;return"string"==typeof i.href&&(null==(t=i.href)?void 0:t.startsWith("javascript:"))?["a",(0,n.KV)(this.options.HTMLAttributes,{...i,href:""}),0]:i.href?["a",(0,n.KV)(this.options.HTMLAttributes,i),0]:["a",(0,n.KV)(this.options.HTMLAttributes,{...i,href:null}),0]},renderHTMLforAI(e){let{mark:t,disableBookmarks:i}=e,n=t.attrs.href;return i?["a",{href:t.attrs.href},0]:["a",{bookmark:(0,x.vL)(t),href:n},0]},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'},{tag:"a[bookmark]",getAttrs:x.Ll}],addCommands(){var e;return{...null==(e=this.parent)?void 0:e.call(this),convertLinkToMedia:e=>t=>{let{chain:i,editor:n}=t,{href:a,...r}=n.getAttributes("link");if(!a||(0,Z.hc)(a))return!1;if(!r.source)return i().extendMarkRange("link").insertEmbedAndFetchMetadata(a,e,!1).run(),!0;let s=b.Fn[r.source],l=(null==s?void 0:s.nodeName)||"embed";return i().extendMarkRange("link").insertContent({type:l,attrs:{...r,sourceUrl:a,url:a,displayStyle:e}}).selectInsertedNode().run(),!0},convertMediaToLink:()=>e=>{let{state:t,chain:i}=e;if(!(t.selection instanceof s.nh))return!1;let{from:n,to:a,node:r}=t.selection;if(!(0,C._Y)(r))return!1;let{sourceUrl:l,meta:o}=r.attrs,c=(null==o?void 0:o.title)||l||"link",d={from:n+1,to:n+1+c.length};return i().insertContentAt({from:n,to:a},[{type:"paragraph",attrs:{},content:[{type:"text",text:c}]}],{updateSelection:!0}).setTextSelection(d).setMark(G.name,{...r.attrs,href:l}).run(),!0},convertLinkToButton:()=>e=>{let{editor:t,chain:i}=e,{href:n=""}=t.getAttributes("link");return i().extendMarkRange("link").deleteSelection().insertContentAndSelect((0,o.GO)().buttonGroup).updateAttributes("button",{href:n}).run(),!0},convertButtonToLink:()=>e=>{let{chain:t,state:i,editor:a}=e,{selection:s}=i,l=(0,n.KP)(e=>"button"===e.type.name)(s),o=(0,n.KP)(e=>"buttonGroup"===e.type.name)(s);if(!o||!l)return!1;let{node:c,pos:d}=l,{node:p,pos:u}=o;if(!c)return!1;let h={type:"paragraph",content:c.content.toJSON()},g=p.maybeChild(0)===c,m=g?u:d,x=m+(g?1:2),f=x+r.bP.fromJSON(a.schema,h).content.size,b=t();return 1===p.childCount?b.deleteNode("buttonGroup"):b.deleteNode("button"),b.insertContentAt(m,h,{updateSelection:!1}).setTextSelection({from:x,to:f}).setMark(G.name,{href:c.attrs.href}).focus().run(),!0},convertButtonToMedia:e=>t=>{let{chain:i,state:a}=t,{selection:r}=a,s=(0,n.KP)(e=>"button"===e.type.name)(r),l=(0,n.KP)(e=>"buttonGroup"===e.type.name)(r);if(!s||!l)return!1;let{node:o,pos:c}=s,{node:d,pos:p}=l;if(!o||!d)return!1;let{href:u}=o.attrs;if(!u||(0,Z.hc)(u))return!1;if(d.maybeChild(0)===o){let t=[];d.forEach(e=>{"button"===e.type.name&&e!==o&&t.push(e.toJSON())});let n=i();n.setNodeSelection(p).deleteNode("buttonGroup").insertEmbedAndFetchMetadata(u,e,!1),1!==d.childCount&&t.length>0&&n.insertContentAt(p+1,{type:"buttonGroup",content:t},{updateSelection:!1}),n.focus().run()}else i().setNodeSelection(c).insertEmbedAndFetchMetadata(u,e,!1).selectInsertedNode().focus().run();return!0},convertMediaToButton:()=>e=>{let{chain:t,state:i}=e;if(!(i.selection instanceof s.nh))return!1;let{node:n}=i.selection;if(!(0,C._Y)(n))return!1;let{sourceUrl:a=""}=n.attrs;return t().deleteSelection().insertContentAt(i.selection.from,(0,o.GO)().buttonGroup).updateAttributes("button",{href:a}).focus().run(),!0},updateSurroundingLink:e=>t=>{let{state:i,chain:n,editor:a}=t,{from:r,to:s}=i.selection;return(0,Z.uI)(e,a),n().extendMarkRange(G.name).unsetMark(G.name).setMark(G.name,{href:e}).setMeta("preventAutolink",!0).setTextSelection({from:r,to:s}),!0},convertLinkToDocMention:()=>e=>{let{chain:t,editor:i}=e,{href:n=""}=i.getAttributes("link"),a=(0,g.TY)(n||"");return!!a&&(t().extendMarkRange("link").command(e=>{let{state:t,commands:i}=e,{from:n,to:r}=t.selection;return i.addDocMention({id:a},{from:n,to:r}),!0}).run(),!0)},removeSurroundingLink:()=>e=>{let{state:t,chain:i}=e,{from:n,to:a}=t.selection;return i().extendMarkRange("link").unsetMark("link").setMeta("preventAutolink",!0).setTextSelection({from:n,to:a}).focus(),!0}}},addKeyboardShortcuts(){return{"Mod-k":e=>{let{editor:t}=e,{selection:i}=t.state;return!i.empty&&t.commands.toggleMark(this.name)}}},addProseMirrorPlugins(){var e;let t,i=(null==(e=this.parent)?void 0:e.call(this))||[];return h.D1||i.push((0,m.f)(this,O)),i.push((t=this.editor,new s.k_({key:new s.hs("handleCmdClickLink"),props:{handleDOMEvents:{click:(e,i)=>{var n;let a=(0,l.KA)(),r=(0,d.nD)(a.getState()),s=null==(n=i.target)?void 0:n.closest("a"),o=null==s?void 0:s.href;if(!o||(null==s?void 0:s.closest("[data-comments-wrapper]")))return!1;i.preventDefault();let c=i.ctrlKey||i.metaKey,u=(0,p.Ww)(o),h=(0,d.bO)(a.getState()),g=(0,p.Cf)(o,h);if(r){if(!c)return!1;if(g)return(0,y.T)(t,i,u),!1}else if(!c&&g)return(0,y.T)(t,i,u),!1;return window.open(o,"_blank"),!1}}}}))),i.push(new s.k_({key:w,props:{handleKeyDown(e,t){let i,n;if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return!1;let{state:a}=e,{selection:r}=a;if(!(r instanceof s.U3))return!1;let l="ArrowLeft"===t.key?-1:1,o=t.metaKey||t.ctrlKey,c=t.shiftKey,d=t.altKey,p=a.schema.marks.link,u=r.head,h=k(a,u,p),g=k(a,u-l,p),m=k(a,u+l,p);if(!(h||g||m))return!1;if(o)i=function(e,t,i){let n=e.resolve(t);return i>0?n.end(n.depth):n.start(n.depth)}(a.doc,u,l);else if(d){let e="ArrowLeft"===t.key?u-1:u+1,n=function(e,t,i){let n=e.resolve(t).marks().find(e=>e.type===i);if(!n)return null;let a=t-1,r=t+1;for(let r=t-1;r>=0;r--)try{if(!e.resolve(r).marks().some(e=>e.type===i&&e.eq(n))){a=r;break}0===r&&(a=0)}catch(e){break}for(let a=t;a<=e.content.size;a++)try{if(!e.resolve(a).marks().some(e=>e.type===i&&e.eq(n))){r=a;break}a===e.content.size&&(r=e.content.size)}catch(e){r=a;break}return{from:a,to:r}}(a.doc,e,p);if(!n)return!1;i="ArrowLeft"===t.key?n.from:n.to}else i=u+l;return i=Math.max(0,Math.min(i,a.doc.content.size)),n=c?s.U3.create(a.doc,r.anchor,i):s.U3.create(a.doc,i),e.dispatch(a.tr.setSelection(n).scrollIntoView()),!0}}})),i}}).configure({HTMLAttributes:{target:void 0,rel:"noopener noreferrer",class:"link"},validate:Z.KB,protocols:v.r,linkOnPaste:!1})},49854:(e,t,i)=>{"use strict";i.d(t,{I:()=>r,k:()=>s});var n=i(93766);let a=e=>"".concat(e," !important"),r=e=>({fontFamily:a(e)}),s=e=>{let t={"[data-shape=image]":{".tl-inner-div":{}},img:{'&[src^="blob:"]':{animation:"loading-pulse-animation 1.5s infinite"}}},i=Object.values(n.JM),r=e?"dark":"light";return i.forEach(e=>{t['[data-color="'.concat(e,'"]')]={color:a(n.gA.strokes[r][e]),":not(mask) > [fill], &[fill]":{"&:not([fill=none])":{fill:a(n.gA.fills[r][e]),"text, tspan":{fill:a(n.gA.strokes[r][e])}}},"[stroke]":{"&:not([stroke=none])":{stroke:a(n.gA.strokes[r][e])}}}}),t}},49876:(e,t,i)=>{"use strict";i.d(t,{F:()=>s,L:()=>r});var n=i(85531),a=i(83691);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return"unknown";try{let a=new URL(e),r=(0,n.removeWWWPrefix)(a.hostname);if(i.includes(r))return"trusted";let s=t.find(t=>t.url===e);if(!s)return"unknown";if(3===s.status)return"untrusted";if(2===s.status)return"unknown";if(1===s.status)return"trusted";s.status}catch(t){console.error("[getLinkTrustLevel] Error checking link",e,t)}return"unknown"},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return"";let n=r(e,t,i);return"trusted"===n?e:"untrusted"===n?"".concat(a.$.FRONTEND_URL,"/[untrusted-url]"):"".concat(a.$.FRONTEND_URL,"/external-link?url=[").concat(encodeURIComponent(e),"]")}},50024:(e,t,i)=>{"use strict";i.d(t,{lF:()=>a,L3:()=>n,pl:()=>r,JL:()=>s}),i(94524),i(20044),i(3898),i(49617),i(35738),i(46030),i(29131),i(40425),new(i(63867)).hs("BlockHoverKey");let n=e=>{var t;return(null==(t=e.find(e=>e.spec.isTableHover))?void 0:t.spec)||{}},a=e=>{var t;return(null==(t=e.find(e=>e.spec.isTableFocus))?void 0:t.spec)||{}},r=e=>e.some(e=>e.spec.isAnnotatableHover),s=e=>e.some(e=>e.spec.isBlockHover)},50265:(e,t,i)=>{"use strict";i.d(t,{B:()=>n});let n=i(91929).B.extend({addKeyboardShortcuts(){return{"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},50963:(e,t,i)=>{"use strict";i.d(t,{h:()=>p});var n=i(37243),a=i(55729),r=i(57067),s=i(35460);i(29143);let l=!!window.next,o=r.wg,c=r.DJ;class d{setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){return void 0===this.options.current.immediatelyRender?l?null:this.createEditor():this.options.current.immediatelyRender?this.createEditor():null}createEditor(){var e=this;let t={...this.options.current,onBeforeCreate:function(){for(var t,i,n=arguments.length,a=Array(n),r=0;r{let{closePanel:t,editor:i,selectedCardPos:n,selectedCardId:a}=e,r=(0,Q.GV)((0,nJ.dJ)(a)),s=(0,Q.GV)((0,nJ.gR)(a)),l=(0,Q.GV)((0,nJ.rT)(a)),o=(0,Q.jL)(),c=(0,nZ.tO)(void 0,"editCard",nK.VV.GAMMA_UPSELL_CALLOUT_AI_CREDITS_GENERATE_CARD),d=i.view.state.doc.nodeAt(null!=n?n:0),{generateCardLayoutVariants:p,revertToOriginalCard:u,interactionId:g}=(e=>{var t;let{editor:i,start:n,cardId:a,card:r}=e,s=(0,Q.GV)(eT.Jo),l=(0,Q.GV)(ep.SJ),o=(0,n$.lI)(i),c=(0,n$.zK)(o),d=i.state.doc.resolve(n),[p]=(0,_.useState)(r),u=(0,Q.CU)(),h=(0,Q.GV)((0,nJ.dJ)(a)),g=(0,Q.GV)((0,nJ.gR)(a)),m=(0,Q.GV)((0,nJ.rT)(a)),x=(0,Q.jL)(),[f,b]=(0,_.useState)(null),C=(0,Q.GV)(ep.Uu),v=(null==s?void 0:s.organization)?(0,nf.P9)(s.organization.id):void 0,y=(null==v?void 0:v.id)||(null==s||null==(t=s.organization)?void 0:t.id),{imageProvider:w,imageModel:k,imageStyle:A}=(0,nx.V)(),L=(0,_.useCallback)(async e=>{let{variantsWithHtml:t,docId:n,interactionId:a}=e,s=[...t];for(let e=0;e{var n;if(!i||(null==(n=i.content.firstChild)?void 0:n.type.name)!=="gridItem")return null;let a=dv(e,t.clientX-db,t.clientY),r=dv(e,t.clientX+db,t.clientY),s=dv(e,t.clientX,t.clientY-db),l=dv(e,t.clientX,t.clientY+db);return a&&r&&dy(a,r)&&dA(a,"horizontal")?dw(a,r,t,e,"horizontal"):s&&l&&dy(s,l)&&dA(s,"vertical")?dw(s,l,t,e,"vertical"):a&&!r&&dA(a,"horizontal")?dk(a,t,e,"right"):r&&!a&&dA(r,"horizontal")?dk(r,t,e,"left"):s&&!l&&dA(s,"vertical")?dk(s,t,e,"bottom"):l&&!s&&dA(l,"vertical")?dk(l,t,e,"top"):null};var dj=i(62293),dE=i(20946),dS=i(80844),dM=i(79733),dI=i(44783),d_=i(30870);class dD{destroy(){this.handlers.forEach(e=>{let{name:t,handler:i}=e;return this.editorView.dom.removeEventListener(t,i)})}update(e,t){null!=this.cursor&&t.doc!=e.state.doc&&(this.cursor.pos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){var t,i,n,a,r;(((null==e?void 0:e.pos)||null)!=(null==(t=this.cursor)?void 0:t.pos)||(null==e?void 0:e.type)!=(null==(i=this.cursor)?void 0:i.type)||(null==e?void 0:e.side)!=(null==(n=this.cursor)?void 0:n.side))&&(this.cursor=e,null==e?(null==(r=this.element)||null==(a=r.parentNode)||a.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){var e;let t,i;if(null==this.cursor||!this.editorView)return;let n=this.editorView.state.doc.resolve(this.cursor.pos),a,r=()=>"";if("replaceImage"===this.cursor.type)a=this.cursor.rect,r=()=>e2.Ru._({id:"8OLLt2"});else if("gallery"==this.cursor.type&&(null==(e=this.cursor.node)?void 0:e.type.name)!=="gallery")a=this.cursor.rect,r=()=>e2.Ru._({id:"pl+vw2"});else if("blankRect"==this.cursor.type)a=this.cursor.rect,r=()=>"";else if("smartLayoutVariant"==this.cursor.type)a=this.cursor.rect,r=()=>e2.Ru._({id:"hErHGD"});else if("column"==this.cursor.type||"gallery"==this.cursor.type||"smartLayout"==this.cursor.type||"tableColumn"==this.cursor.type||"gridItem"==this.cursor.type){let e=this.cursor.rect;if(!e)return;if("tableColumn"===this.cursor.type){let t="right"==this.cursor.side?e.right:e.left;a={top:e.top,bottom:e.bottom,left:t-this.width/2,right:t+this.width/2},r=()=>e2.Ru._({id:"6dfyH3"})}else if("gridItem"===this.cursor.type){let e=this.cursor.rect;if(!e)return;if("top"===this.cursor.side||"bottom"===this.cursor.side){let t="top"===this.cursor.side?e.top:e.bottom;a={left:e.left,right:e.right,top:t-2,bottom:t+2}}else{let t="left"===this.cursor.side?e.left:e.right;a={top:e.top,bottom:e.bottom,left:t-2,right:t+2}}}else{let t="right"==this.cursor.side||"bottom"==this.cursor.side,i=t?n.nodeAfter:n.nodeBefore,r=i&&((0,dE.NJ)(i)||(0,dM.q)(i))?0:this.width;if("right"==this.cursor.side||"left"==this.cursor.side){let i=t?e.right+r:e.left-r;a={top:e.top,bottom:e.bottom,left:i-this.width/2,right:i+this.width/2}}else{let i=t?e.bottom+r:e.top-r;a={left:e.left,right:e.right,top:i-this.width/2,bottom:i+this.width/2}}}}else if(!n.parent.inlineContent){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let i=this.editorView.nodeDOM(this.cursor.pos-(e?e.nodeSize:0));if(!i||!(i instanceof Element))return;let n=i.getBoundingClientRect(),r=e?n.bottom:n.top;e&&t&&(r=(r+this.editorView.nodeDOM(this.cursor.pos).getBoundingClientRect().top)/2),a={left:n.left,right:n.right,top:r-this.width/2,bottom:r+this.width/2}}}if(!a){let e=this.editorView.coordsAtPos(this.cursor.pos);a={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;if(this.element||(this.element=s.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),s&&(s!=document.body||"static"!=getComputedStyle(s).position)){let e=s.getBoundingClientRect();t=e.left-s.scrollLeft,i=e.top-s.scrollTop}else t=-pageXOffset,i=-pageYOffset;this.element.style.left=a.left-t+"px",this.element.style.top=a.top-i+"px",this.element.style.width=a.right-a.left+"px",this.element.style.height=a.bottom-a.top+"px",this.element.dataset.type=this.cursor.type;let l=r();this.element.innerHTML="tableColumn"===this.cursor.type?"":l,this.element.dataset.message=l}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}checkTableColumnDragEvent(e){var t;if(null==(t=e.dataTransfer)?void 0:t.types.includes("text/x-column-index")){let t=((e,t)=>{var i;let n;if(!(null==(i=t.dataTransfer)?void 0:i.types.includes("text/x-column-index")))return null;let a=t.target;if(!a||!(a instanceof HTMLElement))return null;let r=a.closest("th.table-col-control");if(!r)return null;let s=r.getBoundingClientRect(),l=r.closest("table"),o=(null==l?void 0:l.getBoundingClientRect())||s,c=new DOMRect(s.left,o.top,s.width,o.height),d=.15*s.width,p=s.left+d,u=s.right-d;n=!(t.clientX